I wanted to try to develop here a curious discussion, which was the beginning of the
topic in the comments for the future podcast Radio-T (by the way, the podcasts themselves are sometimes interesting), but then stalled due to the lack of a quorum.
The discussion is about the future of Java as a language and as a platform.
In short, what can those who direct Java development do to keep it afloat for a long time? According to the link above, the discussion went in the direction of why alternative languages for the .NET platform (such as F #) are more or less actively developed in the Microsoft Research laboratories, but Sun / Oracle with such support for alternative languages are lagging behind.
So, some of my thoughts on this ...
')
Java was originally positioned as a platform-independent programming language. I emphasize, not a platform, but a cross-platform language. Such that write once, run anywhere. Those. Despite the fact that the JVM stack engine architecture and the bytecode structure allowed and allowed porting other languages to the JVM, the Sanovans never emphasized this. The emphasis has always been on the fact that there is a JVM that works everywhere, there is a byte code that does not depend on the architecture, there are no pointers and other direct memory access, which is cool. So write to Java (language) and you will be happy.
Compare this with the positioning of .NET, C # and the position of Microsoft here. Even when I was learning C # 2.0 from Andrew Troelsen’s book about 5 years ago (this was before my transition to Java;)), on the contrary, it was written everywhere that .NET and its components, in particular the CLR environment, is an intermediate hosting environment managed code. C #, VB #, managed C ++ (which was not really shot, but the experiment was conducted), and all languages ported to .NET, such as IronPython and others like them, as well as new languages developed by Microsoft Research, such as F #.
At the same time, for example, Mycrofost, in addition to rapidly developing the “primary” language, C #, is also actively invested in, and the development of other languages is done under Dotnet. For example, F #, which adopted many concepts from OCaml and, as far as I know, Haskell. The F # code is literally very similar to the Haskelle code, I assure you! The MSSQL server is also able to host the CLR and supports, as far as I know, the writing of stored procedures on it.
Now back to the world of Java. So -Java, as a platform and as a language, develops slowly under comparison with C # and .NET, this is obvious. Perhaps this is correct, since the Enterprise world (banks, stock exchanges, etc.) is more important than stability, not rapid development.
But here is the moment. Java as a language, precisely as a language, and not a platform, is very poor and limited. Yes, it is pretty pretty slender, simple, compact and all that (I myself am a javist), but limited, does not support many concepts, does not provide language support for closures, lambdas, work with collections, regular expressions, and generally frozen because that too much is tied to it. All changes pass through the JCP, which is known to be pretty darn slow.
On the other hand, there is Groovy, Scala, for those who want something more unusual - Closure. At the same time, these languages are written and debugged either by community groups (for example, Groovy is developed by the SpringSource community), or for grants (like Scala, which recently received a large EU grant). I don’t see support from the Sun / Oracle side here, well, except perhaps the introduction of the InvokeDynamic instruction in Java 7, but this is not enough. Little and too slow.
In general, in my opinion, Java has a great chance to hold leadership as a platform for a very long time if it invests in development and, most importantly, promotion (!) Of the main alternative languages under the JVM. This is what .NET marketers have advertised as one of the powerful benefits of the platform from the very beginning.
“Write in your favorite language, be it good old Java, concise Groovy with its sugar and metaprogramming, sophisticated and a little academic Scala, or Clojure (here without epithets, because I didn't touch, I don't know), and run on standard, reliable , a proven (million adjectives) Java platform. ”
How do you?
Noticeable difference in positioning platforms. .NET was initially positioned as a platform for crossing many languages in runtime (for starters it was C #, VB #, managed C ++), but Java marketers didn’t have that much. Positioning has always been a little different - Java is such a universal language that works on the Java platform, where there is a platform-independent bytecode, there is no work with memory, and so on. But about the fact that, under JVM, you can develop and port other languages, and write code on them - this, as far as I can remember, was never done.
So who still thinks about this? The future is in languages, as such, in their current understanding (including languages such as Lisp, Nemerle, Ruby ...), or, nevertheless, platforms for hosting runtime services, with a bunch of compilers for them (which are, in fact, parsers of grammar and generators bikod in one form or another)?