18 ms·
Rise and fall of JVM languages
- amelius 9y agoI'm not a Java guy, but I'm still wondering why nobody every wrote a JVM with near-zero startup time.
- lucian1900 9y agoIt's largely to do with standard library class loading. The only way to avoid this is an alternate compilation model, like GCJ (and other native code compilers) or Dalvik.
- pebers 9y agoPresumably it isn't easy to start everything the JVM needs & does in effectively no time. Although to be fair it actually is fairly quick for a "hello world" type program - much of the startup time of Java programs tends to be loading bytecode of their dependencies rather than starting the JVM itself.
- amelius 9y agoIsn't it possible to do lazy-loading in the JVM?
- chrisseaton 9y agoThe JVM does do lazy-loading.
- chrisseaton 9y agoIf you've got some good ideas of how to achieve this that you've been keeping to yourself then please share them!
- kybernetikos 9y agoA few years back I built a system that ran in the background and spun up fresh JVMs, which it then kept in readiness. When you wanted to start something, it would use the waiting one so you avoided the slowdown. Well, it was still pretty slow...
- ztjio 9y agoWell I am a Java guy and have two points to make. First. What are you even talking about? Quiet:test user$ time java Test Test real 0m0.104s user 0m0.074s sys 0m0.028s Quiet:test user$ That's on a current MBP 13" top end. And second: Who cares? What us "Java guys" do with Java, well, it doesn't matter in the slightest that it takes half a second to start. Because, we deploy to running processes. "We" power things like Hadoop clusters. The startup time is meaningless in "our realm" and frankly, I think if you're wondering about java for something like command line tools, it's just the wrong tool for the job for many reasons. And if you're looking at GUI apps, it's still better than Electron :P So seriously, Hacker News, what is the obsession with this?
- Swizec 9y ago> So seriously, Hacker News, what is the obsession with this? We are optimists, we think there is always something that could be improved.
- Insanity 9y agoIs that optimism or pessimism? ;-) "It's never good enough" can be interpreted in two way. Though I do agree that we should always strive to make it as good as possible. Being a "Java guy" myself, I indeed do not find the JVM startup time to be a big deal in our applications. Especially in my environment (hospital) where our program is pretty much running the entire day without a restart. So in the morning, the doctors/admin/.. start their application and rarely shut it down until the end of the day. (That is of course quite specific to where I work)
- imtringued 9y agoThe JVM languages usually add their own heavy libraries. I believe the JVM is optimized for loading the standard library as quickly as possible but this optimization doesn't apply if you use a JVM language that comes with it's own libraries.
- baxter001 9y ago> So seriously, Hacker News, what is the obsession with this? We are dilettantes, we think there is always something that could be improved in a domain we don't fully understand.
- pjmlp 9y agoBecause they already exist, people outside JVM world just aren't aware of them. https://www.excelsiorjet.com/ https://www.excelsiorjet.com/ is just one example from many third party commercial JDK vendors delivering AOT compilers since the early days of Java, and still in business. Also for those that don't want to pay for AOT compilers, OpenJDK is going to start supporting AOT compilation as well.
- cwyers 9y agoYou have to remember that the general bias on Hacker News is that if you have to pay for it, it doesn't exist.
- didymospl 9y agoAOT compilation and Project Jigsaw coming up in Java 9 should improve the JVM startup time. Although I guess it won't speed up the loading of applications written in other JVM languages much as it's not really JVM's fault.
- PopsiclePete 9y agoI don't run any client-side Java apps. But I do run quite a few server-side ones - like ES. Yes, startup time isn't lightning-fast, but once it's up - it's up for months. I can wait 15 seconds. Its cool.
- mike_hearn 9y agoThey did: https://youtu.be/5BMHIeMXTqA?t=12m5s https://youtu.be/5BMHIeMXTqA?t=12m5s
- Insanity 9y agoI'm surprised to see that Groovy slightly beats Kotlin in on that graph. I really underestimated Groovy popularity, or overestimated Kotlin. I've yet to work with Kotlin but did like Groovy some years ago. Never used it professionaly though, only for play-projects.
- chii 9y agogroovy is great. It doesn't have much marketing behind it, so it's seems to be a bit of a quiet achiever. But for dsl makin', groovy is such a good language.!
- Insanity 9y agoI should perhaps check it out again. It's been years since I've used it, but did enjoy it when I did.
- fithisux 9y agoGroovy deserves better. But its tight couple with JVM eliminate the possibility of native or JS.
- olavgg 9y agoWe use Groovy in production, working with SQL, Transactions or JSON is much easier than Java. Meta programming and Traits are other advantages. The biggest advantage is that it is so similar to Java code, that any Java developer can pick it up and understand it immediately. We still love and use Java a lot and they both complement each other very well.
- user5994461 9y agoJava, the only language where you can consistently get work by just showing up to an interview, is not falling at all. If anything, it will stay here for decades thanks to so many enterprise and massive projects relying on it.
- latchkey 9y agoThe whole getter/setter argument is trite. Project Lombok has been around for years and resolves that issue as well as many more.
- lmm 9y agoYou end up needing more-or-less your whole ecosystem to understand Lombok - your IDE, debugger, profilers, linters, code coverage tools... it ends up being just as much effort as switching languages.
- edem 9y agoYep, my thoughts exactly. I tried lombok when I was coding in Java and ended up dumping it beause it had more issues than it tried to solve.
- edem 9y agoLombok has a lot of issues. First and foremost it won't compile for people who don't bother installing it for their IDE. This greatly hampers OSS collaboration because it raises barriers of entry. I know there is delombok but the whole stuff comes with a lot of drawbacks. Reorganize my project just to delombok my project...whoa...
- latchkey 9y agoIt is nearly impossible to code any amount of Java without a proper IDE (Eclipse/IDEA). Or at least it isn't a sane decision to do so. Lombok is well supported in both of those IDE, especially for the use case of @Data/@Getter/@Setter. Installing it is just as easy as adding any other dependency (especially in IDEA with it's plugin ecosystem). It really is too bad this isn't just installed as default in the IDE though. Heck, I'd even suggest it be part of the language itself. But for now, we just shrug, install it and get back to coding. =)
- Chris2048 9y agoTrue, but it's not trivial to adopt.
- federicodalmaso 9y agoYou forget scala-native project: https://github.com/scala-native/scala-native https://github.com/scala-native/scala-native It seems to have major traction looking at contributions trend. Together with scala.js it open up the scala language to three different outputs: native (LLVM), js and JVM. Great strategy in my opinion.
- ojosilva 9y agoI wonder why Kotlin beat Scala in this virtual programming language traction game. I don't write code for the JVM anymore, but Kotlin occupies the same space as Scala. Was it compilation speed? Corporate support?
- _Codemonkeyism 9y agoI've been using Scala for a long time. I would be attracted to Kotlin because IDE (Intellij) verification is very slow in Scala, compilation speed is and will be slow (really interested in efforts to reduce language scope to speed up mentioned on HN earlier), error messages in Scala are a pain.
- yawaramin 9y agoTry https://github.com/Duhemm/sbt-errors-summary https://github.com/Duhemm/sbt-errors-summary
- _Codemonkeyism 9y agoThanks will use it, doesn't change the fundamental problem of error messages and multi-line type expressions. Would wish for that attitude: http://elm-lang.org/blog/compiler-errors-for-humans http://elm-lang.org/blog/compiler-errors-for-humans
- izacus 9y agoProbably because it was built to seamlessly interoperate with existing Java code and targeted JVM 6 compatibility (it was built to make development of IntelliJ IDEs simpler which had to run on Java 6 VMs and which already had a lot of code written in Java). As such it turned out to be a natural fit for Android apps as well, because the platform has pretty much the same type of limitations. Other nice things: - Standard library is tiny so you don't get a large app size and method count hit. - The datastructures are fully interoperable with Java ones so calling out to existing Java libraries and code feels completely natural. I need to stress how important this is - you can just drop Kotlin classes into existing codebase and things will just work and look natural. - The language itself it very easy to pick up - it fixes A LOT of Java pain points, but it doesn't really try to change fundamental paradigms. Which means that pretty much any Java developer can quickly become productive in it. - The IDE support it superb and practically on the same level as Java. - The compiler is fast enough and good enough.
- krig 9y ago> I started developing in Java, late 2001. At that time, Java was really cool. As someone who was there in 2001, I just have to say: Java was never cool, and especially not at that time. It was bloated and ugly and slow, the GC was terrible, applets were simply the worst, the UI toolkits available looked horrible on every single platform. There were no decent IDEs or editors and the language was if possible even more verbose and circumspect back then.
- xaduha 9y ago> As someone who was there in 2001, I just have to say: Java was never cool, and especially not at that time. It was so uncool they named JavaScript after it.
- wolfi1 9y agothat was earlier than 2001 I believe
- goatlover 9y ago1995. Interesting because Java was initially Oak, and JS was LiveScript. But then Netscape & Sun got together. Sun wanted Java to be the language in the browser, Netscape wanted an easy to use lightweight language, Brendan Eich thought he would be putting Scheme in the browser, and the end result of all that was JavaScript. But Netscape 2 was also supposed to ship with the JVM and a canvas-like platform for both to target. However, it was too ambitious, so only JS made it.
- raugustinus 9y agoI tend to agree here. But wasn't that the sorry state for like all languages out there? Or at least a combination of the reasons you mention.
- krig 9y agoYeah, in hindsight it wasn't a great time for programming languages in general...
- johnflan 9y ago> I decided Scala made it too easy to write code unreadable for most developers As a side note, this seems to be the biggest detractor for Scala. Any team that I have spoken to with Scala experience seem to have had projects that went too 'Scala/functional'.
- edem 9y agoScala is the Perl of the JVM. :D
- collyw 9y agoI have heard that before. I like(d) Perl. Got me tempted to try Scala.
- AzzieElbab 9y agoThen don't. I couldn't think of two more different languages.
- collyw 9y agoWhats so bad about Scala? It does seem to get a similar "either you love it or you hate it" response from people.
- AzzieElbab 9y agoI think the audience is the problem. Java devs prefer Java and Haskell devs prefer Haskell. Aside from some rare open minded individuals and people who have to write java, but would prefer to work with Haskell, Scala is up against a tough crowd.
- AzzieElbab 9y agoThen don't. I couldn't think of two languages more different in every way.
- RandyRanderson 9y agoI remember reading so many headlines like "email is dead" over the years. Email is not dead according to every pop-over i see but all those 'replacements' are. There are very, very few technologies that are 'winners' (pick your own meaning) in the long run. Choose wisely.
- norswap 9y agoIf the language designers keep their heads, Kotlin will slowly eat away at Java. Java itself is never going away: it's a Fortran or Cobol situation, only maybe three or four orders of magnitudes bigger. Xtend never was alive, and it's clear Ceylon has lost at this point, even though it is arguably better designed than Kotlin. However, they made some bad syntactic decisions (not shedding enough of the Java verbosity, introducing new weird keywords), and when you're doing run the mill Java-like programming, it's just more gratifying to write/read Kotlin code. Scala's development is somewhat unpredictable, but I think it's fair to say it's lineage is not going away either. New compilers are being developed by the original team (Dotty) and by Twitter (reasonable scala) with very different objectives. Currently, there simply aren't any many contenders in Scala's niche (very powerful statically typed programming languages with a pragmatic bend, i.e. not Haskell). C++ could fit the bill but pushes memory management and Cthulhu on you. The ML family could also fit the bill, but lacks momentum/hype. However Facebook is spearheading a revival with Reason ML. Scala's big trump card is the Java library ecosystem.
- pjmlp 9y agoKotlin can never replace Java as long as the JVM is relevant. This is like trying to replace C on UNIX, C# on .NET, Erlang on BEAM, or JavaScript on the browser.
- norswap 9y agoKotlin is essentially Java with some sugar sprinkled on top. That's its strength: the semantics & the concepts are the same. I also never said Kotlin will replace Java, but that it will gradually grow to the detriment of Java, which is still here to stay.
- pjmlp 9y agoI don't believe Kotlin will get much strong outside Android. In all these years of alternative languages customers still don't allow us to use anything other than plain Java.
- olodus 9y agoNo mention of Clojure? It should defiantly be mentioned as on of the big JVM languages. Though I get that it maybe isn't what the author was looking for I'm a bit surprised it was totally overlooked.
- JBiserkov 9y agoNo mention of Clojure? In the comments the author says that since it was a functional JVM language, he never considered it. OK.
- hellofunk 9y agoYes that's a very strange comment and taints the perspective of the author for the entire article. Kotlin and Scala are also functional or include strong functional abilities, as do many modern languages not on the JVM, so I'm not sure what being "functional" has to do with his omission.
- sankyo 9y agoHe only considers statically typed languages to be worthy. He doesn't spend much time on Groovy, writing it off as a scripting language. That is my take on why he left it out.
- Nekorosu 9y agoThere is a comment from the author that states he hasn't mentioned Clojure because it's FP language. He doesn't go into details bit it looks like he just skipped everything that doesn't support class based OOP. Scala has this feature.
- KirinDave 9y agoClojure supports this though. And given that removing the FP nature of Scala pretty much hamstrings its value proposition, I can see why he'd be dismissive of it on those grounds.
- Nekorosu 9y agoClojure supports class based OOP? Never heard of it. Could you give me a link to the relevant documentation page?
- 9y ago
- kornakiewicz 9y agoI'm JVM guy and really wish this platform has something like F# - "minimalistic" functional language (not like Scala) with static, powerful type system (not like Clojure).
- berdario 9y agoHave you seen Frege and Eta? https://github.com/Frege/frege https://github.com/Frege/frege http://eta-lang.org http://eta-lang.org
- jabl 9y agoeta looks interesting for Haskell refugees in Java-land.. That being said, any idea why they started from scratch instead of building on or contributing to frege?
- kuschku 9y agoThey had ideological differences, Frege focusing on the Haskell standard, Eta on "whatever GHC does".
- cutler 9y agoPure FP language communities have a lot in common with extreme left movements where small differences can lead to complete forks. There seems to be an equivalence between purity and intolerance.
- deleted 9y ago[deleted]
- KirinDave 9y agoIt's too bad, because Scala could have been more judicious in how it marketed this. Scala has a lot of nice features, but its a very disorienting environment when it's used as a "backwards haskell".
- 9y ago
- edem 9y agoThis article is very poorly thought out. First and foremost it talks about the __fall__ of JVM languages yet it forecasts good things for all of those languages. The author also failed to check out things like the TIOBE index where Java is still at the top. Not to mention that Clojure hasn't even been mentioned which is a __huge__ letdown since Clojure is the only pure functional language which is native to the JVM.
- hellofunk 9y agoI agree. There are many points and oddities in this article that make it a poor source of information on the topic. Actually, not just a poor source, a misleading one.
- user5994461 9y agoThe title is clickbaity, that's all.
- KirinDave 9y agoYou may also be interested in Eta. Clojure reaslly isn't pure functional, strictly.
- davidrupp 9y agoSee also: https://github.com/Frege/frege https://github.com/Frege/frege, https://github.com/LuxLang/lux https://github.com/LuxLang/lux.
- cutler 9y agoThe TIOBE index is a complete farce. Scratch at 19 and Scala 28? How many Scratch jobs are there on Indeed.com?
- hellofunk 9y agoI don't know much about Kotlin but whenever I see code samples, it sure looks like it borrows heavily from Swift.
- dpatriarche 9y agoHere's what Chris Lattner said about Kotlin this past June: "Lattner: Swift and Kotlin evolved at about the same point in time with the same contemporary languages around them. And so the surface-level syntax does look very similar. … But if you go one level down below the syntax, the semantics are quite different. Kotlin is very reference semantics, it’s a thin layer on top of Java, and so it perpetuates through a lot of the Javaisms in its model. "If we had done an analog to that for Objective-C it would be like, everything is an NSObject and it’s objc_msgSend everywhere, just with parentheses instead of square brackets. And a lot of people would have been happy with that for sure, but that wouldn’t have gotten us the functional features, that wouldn’t have gotten us value semantics, that wouldn’t have gotten us a lot of the safety things that are happening [in Swift]. "I think that Kotlin is a great language. I really mean that. Kotlin is a great language, and they’re doing great things. They’re just under a different set of constraints." https://oleb.net/blog/2017/06/chris-lattner-wwdc-swift-panel/ https://oleb.net/blog/2017/06/chris-lattner-wwdc-swift-panel...
- tannhaeuser 9y agoTFA mentions Groovy but not JavaScript which could be considered Java's direct dynamic/scripting variant given JavaScript's origin. In fact, there are two mainstream implementations of it even (rhino, nashorn), though not upgraded to ES2015.
- ben336 9y agoJava and JavaScript are not directly related. JavaScript added Java to the name for marketing purposes. JavaScript doesn't run on the JVM like the rest of these languages
- tannhaeuser 9y agoI'm well aware what Java is, given I'm developing for it (and other things) since 1997 ;) But my original comment was meant seriously, rather than cheap trolling. Unlike Groovy, JavaScript has excellent portability and a perspective to migrate code away from Java/JVM.
- spdionis 9y agoI hope this is trolling :D
- fithisux 9y agoHe fails to mention Golo.
- 0xbear 9y agoI wish .net CLR would take its place instead. For one thing, as strange as that may sound, I trust today's MS more than I trust Oracle. For another, CLR as of 12 years ago (not to mention now) was already better suited for programming language development than JVM ever will be, owing to having less baggage and reified generic types support built in from the start.
- incan1275 9y agoSeriously, using Google search trends isn't the best way to analyze usage or popularity. GitHub stats (assuming they are publicly available), would be much better.
- cutler 9y agoSurely Indeed.com is the place to look for adoption in paid work?
- deleted 9y ago[deleted]