Using D

Russel Winder via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 12 03:38:08 PDT 2014


On Fri, 2014-07-11 at 10:40 -0700, H. S. Teoh via Digitalmars-d wrote:
[…]
> When I finally got past the hype and tried out the language for myself,
> I found the same thing you did: it's totally straitjacketed, and shoves
> the OO idealogy down your throat even when it obviously doesn't fit. The
> infamous long-winded "class MyLousyApp { public static void main(blah
> blah blah) ... }" is a prime example of shoehorning something obviously
> non-OO into an OO paradigm, just because we want to.  Not to mention
> Java's verbosity, which is only tolerable with IDE support -- total
> fail, in my book. I mean, hello, we're talking about a *language*
> intended for *humans* to communicate with the computer? If we need
> *another* program to help us elucidate this communication, something's
> gone very, very wrong with the language. A language that needs a machine
> to help you write, is by definition a language for communication between
> *machines*, not between humans and machines.

Java is not an object-oriented language in the Smalltalk, C++, Python
sense of object-oriented. 

Picking out the main entry boilerplate is a wee bit unfair. Though
Groovy, Kotlin and Ceylon have added top-level functions again by
finding compilation strategies, and Scala has created the App class
which does something similar.

You comment about programming languages applies equally well to C++, Go,
Python, Rust, D, etc. as it does to Java.

> Then there's the lack of generics until the n'th revision, and when it
> finally came, it was lackluster (google for issues caused by type
> erasure in Java sometime). D totally beats Java in this area IMO.

I think it may just be Stockholm Syndrome, but some notable people whose
opinions I generally trust, are now saying that type erasure in Java is
a good thing. I am not one of them. Java should have done what C# did
and enforce reification of type parameters in the underlying machine,
JVM and CLR respectively.

> That's not to say that Java, the language, (as opposed to the class
> library or the marketing hype) isn't a pretty good language. In fact,
> it's quite a beautiful language -- in the idealistic, ivory tower,
> detached-from-real-life sense of being a perfect specimen suitable for a
> museum piece. Its disconnect from the messy real world, unfortunately,
> makes it rather painful to use in real-life. Well, except with the help
> of automated tools like IDEs and what-not, which makes one wonder, if we
> need a machine to help us communicate with a machine, why not just write
> assembly language instead? But I digress. :-P

Now this is mis-direction. Java is a real-world language in that it is
used in the real world. Whilst there are many using Java because they
know no better, many are using it out of choice. Java evolves with the
needs of the users prepared to get involved in evolving the language.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140712/ccfa58b4/attachment.sig>


More information about the Digitalmars-d mailing list