Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was recently at a Java conference where Juergen Hoeller (of Spring fame) was a keynote speaker. In one of his talks he said something like "Once again, Java is solving yesterday's problems". The moment he said that, I thought to myself "Yes! So true!". The day before, Angelika Langer gave a talk on Lambdas in Java 8. I watched as the other developers listened with half-opened mouths (and some of them, with confused expressions on their faces) and wondered why, instead of bolting features other languages have had for decades onto Java (potentially leading to another fiasco like generics), Oracle doesn't instead continue to work on the JVM to give an even better support for languages that already do have these concepts (by, for example, providing support for TCO).


I don't understand or agree with your logic at all. Oracle shouldn't waste time on Java because it is already so far behind as to be hopeless? That notion seems silly at best, especially as 99% of code written on the JVM is still done in Java.

Also, generics fiasco? Generics may not be perfect, but I haven't met a single person who isn't glad that they are in the language. Who has done generics better? C#? Because C#'s type system is baked so heavily into the run time, the CLR actually has a harder time supporting languages with more powerful type systems than does the JVM.

See, for instance, this post: http://olabini.com/blog/2010/07/questioning-the-reality-of-g.... Both Ola, a JRuby developer, and Martin Oderskey, the creatir of Scala, prefer the JVM's type erasure to the reified generics of the CLR.


It depends on what you want to do. It would make sense that Scala, a language that can naturally encode a type class like structure and jruby, a dynamic language wouldn't mind erasure. For jruby it is self evident why and for scala's case, reified generics make it really hard to do higher kinded stuff.

Haskell is type erased too but it's not commonly noticed due to the nature of the structures commonly used and the strength of the type system. But in an OOP language where inheritance is used significantly, you really do need Reified generics as they make things much easier. I believe Java also made additional compromises to maintain backwards compatibility.


As a "language snob", I feel that Java is hopelessly behind among JVM languages. But I also think that C# is well-designed enough that it doesn't matter whether it's the only CLR language I'll ever use. I don't know if the grandparent poster feels the same, but your post actually confirms my opinion.

Of course I have no realistic idea how Oracle would ever migrate millions of Java coders to a cleaner language. :(


>>As a "language snob", I feel that Java is hopelessly behind among JVM languages.

Java is designed by its existence to be a better C++, nothing much. Nothing changes that base design goal.

But this is a design goal for the late 80's and early 90's.

The fate of most Java-only programmers, which are uncountable today is pitiable to say at the least. Its like Dijkstra said, one must avoid prolonged exposure to bad tools. Because they permanently damage your brain. Oracle will never do away with Java, its their bait to sell their products. Most Java programmers will go the COBOL programmers way- "Employable only at MegaCorps"


> "Employable only at MegaCorps"

Usually it comes with a salary full with nice digits.


I agree with your first point. There's no reason not to make Java better.

But generics have been a fiasco. No collections of primitive types? Come on, that is a major fiasco for code that needs to be memory efficient.


Trove and Colt handle those cases fine.


Because in environments where Java is used "switch language your're using" just isn't such a viable option. Especially in the light of an option of just upgrading the language. There's nothing seriously wrong with Java that couldn't be fixed by incremental language updates - like the ones C# has received in last couple of versions.


> Because in environments where Java is used "switch language your're using" just isn't such a viable option.

I hope this excludes the education sector. Nobody should ever learn lambdas as being "implementations of a compiler-guessed interface with one non-defaulted method".


If they were solving tomorrow's problems everyone would complain about premature optimization.

Or time travel. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: