Should Java be more high level or low level?
OverviewJava 8 is bringing much antisipated features such as Lambda expressions, Type Annotations and Virtual Extensions.
While this functionality is a) valuable, b) playing catch up with cooler languages, are these richer, higher level functionality the only area Java should be focused.
What are the most widely used languagesThere are many ways to assess which are the most widely used languages. One index which attempts to consider a wide variety of sources is the Tiobe Index. The positions and ratings are taken from Jan 2013.
|12||Visual Basic .NET||1.0%||newer||no||higher|
The "Age" is based on the initial release date, the "cooler" is purely subjective on my part, and the "Level" column is whether the language supports lower level functionality or is it designed to be more abstract/higher level.
What I take from this list that there are many higher level languages, but the really popular ones support lower level constructs. e.g. Java is the only one in the top 5 not to support structs directly. (It has an optimisation which can work aorund this to a small degree)
Java 8 also plans to introduce fairly low level stuff. How about, for example, the introduction of the `@Contended` annotation to (try to) solve false sharing issues? (http://mail.openjdk.java.net/pipermail/hotspot-dev/2012-November/007309.html) It seems like that one is going to go through. On the other hand, I'm not sure if JEP 169 (http://openjdk.java.net/jeps/169) will make it (sort of structs)...ReplyDelete
That is an interesting addition. You can do much the same with padding, but it would be a real pain for anything non-trivial.ReplyDelete
Languages based on VM should be "higher" level, it is no point making a VM language very "low level", what is the VM for then? Or do you want to develop bytecode assembler code?ReplyDelete
C# is basically what Java should (have) be(en) and it shares same abstraction level, and other languages, C and C++ have clearly other purposes, in general, than Java. Objective-C is just an anecdote due to iPhone and (very little) OSX, but not used anywhere else...
In my opinion, Java should evolve à la C#, adding kind of LINQ, etc.., Java 8 brings, but being very conservative and keeping backwards compatibility, and, maybe, relying most functional/dynamic features to Scala/Clojure and Groovy initiatives.
I miss structs hard in Java. This would enable en/de-coding-free messaging (similar to casting a void* to struct* in C), very fast instantiation of data structures, off-heap without the mess, stack allocation for zero-GC realtime parts of a software, control over memory layout, ease interfacing with native languages ...ReplyDelete
However http://openjdk.java.net/jeps/169 did not convince me from a language-conceptual perspective ..