3 ms·
My problem with Java is the language. Scala and Clojure are great. The platform is excellent technology. The language is mind-numbingly boring. When Scala and
by michaelochurch 15y ago
My problem with Java is the language. Scala and Clojure are great.
The platform is excellent technology. The language is mind-numbingly boring.
When Scala and Clojure projects go "straight to Java", it's generally for specialized purposes (where those languages don't have native maturity) or in already-discovered bottlenecks. I think some degree of that's inevitable. Like database tuning, it's just something you have to do when you get to a certain point where (a) your problem is well-defined, and (b) shaving 20% off latency is worth doing. I consider these good problems to have. If I have to rewrite a class in Java for performance reasons, fine. I'd never start a multi-thousand-line project in Java, though.
Also, I really don't think anyone mature minds writing code in underpowered or difficult languages. C++, I find, is actually a lot of fun to write. It's reading other peoples' code, in large amounts, that becomes intolerable in these languages. If I have to spend a day to answer a simple question like "how do I initialize this object?", that's bad.
Interesting fact: Closures were cut from the 1.0 release for time. Gosling wanted them in, but Java's original purpose was to run in machines like automatic coffee pots and TV "set top boxes", so they were far from essential for that domain. The folk history (which I once believed) of Java being deliberately underpowered so that teams of hundreds of mediocre programmers could be stapled together in it is false. It was, however, co-opted by the "let's commoditize developers" crowd in the late '90s, and we've had to deal with FactoryVisitorDelegates ever since.
- dxbydt 15y ago> Java's original purpose was to run in machines like automatic coffee pots and TV "set top boxes from my time at sun, i remember speeches by Gosling that included microwaves and refrigerators ( i vaguely recall an example of the fridge telling you via java applet that you had run out of milk ). the hotjava thing ( web browser written entirely in java http://en.wikipedia.org/wiki/HotJava http://en.wikipedia.org/wiki/HotJava) created some anticipation around Word & Photoshop & Powerpoint written in java, which were brought up when Sun hosted a gigantic industry conference in Vegas. The Java Chip ( picojava http://www.jopdesign.com/perf.jsp http://www.jopdesign.com/perf.jsp ) was supposed to revolutionize the industry by running java bytecode natively. Honestly I think the dumbing down began once EJB's crept in. There was some nasty visual shit called the Beantool which automatically inserted getters & setters by mandating every EJB to be a Bean, and from then on things got downhill really fast.
- watmough 15y agoA lot of people learned to trust their BS detector. Mine had already been primed with XML "XSLT can map anything to anything!", and Enterprise Java was just more of the same. It's funny that Javascript and WebGL are cleaning up in the browser, and Java applets are almost nowhere to be seen.
- jbooth 15y agoIf reading code is your problem rather than writing code, I find that Java excels. Most of the complaints are about writing code in Java. You know how awesome that type inference is in Scala, and how stupid and annoying it is in Java to type stuff like Map<K,V> myMap = new HashMap<K,V>? I totally agree with how annoying that is. Here's a related example in scala. def myThing = something.getSomeThing() What is the type of myThing? Java has weaknesses for sure but reading code is actually one of its strengths, precisely because of the boilerplate. Note that I'm not defending EJB or any other atrocities here, just the core language. Lastly, I agree that syntactically-nicer closures would be better for Java. But it already has closures, final Something variableImClosingAround; Runnable myClosure = new Runnable() { public void run() { variableImClosingAround.doSomething(); }}; exec.submit(myClosure);
- anonymoushn 15y agoNow assign to the closed-over value :)
- soc88 15y agoThis comment with all its hand-waving reads like it comes straight from 1990.
- jbooth 15y agoHand-waving? There's code in my comment. No code in yours.
- zem 15y agoi actually find c++ more pleasant to read than to write. when writing c++ i am constantly annoyed at the tedium involved in things that would be a few lines of ruby/clojure/ocaml (my top 3 hobbyist languages), but once the tedium activation barrier is crossed and the code is written, it usually ends up pretty clear and straightforward to read and maintain. this is especially true in google, where coding standards are taken seriously and refactoring is a culturally valued operation (that was actually one of the main draws the job had for me).