7 ms·
There's also the question of long-term sustainability. Groovy was very cool and popular in 2010. Ten years later, Groovy is still in the production codebase whi
by BossingAround 7y ago
There's also the question of long-term sustainability. Groovy was very cool and popular in 2010. Ten years later, Groovy is still in the production codebase while the language is essentially dead.
I personally wouldn't go for anything but Java (on JVM, that is) for anything that isn't a pet project.
- msclrhd 7y agoNote that with Kotlin, JetBrains created it initially for working on their IntelliJ IDE and are porting their Java codebase to use Kotlin. So that is a good indicator of long-term sustainability.
- moron4hire 7y agoYeah, it's not like it's a Google project. You can probably expect JetBrains to support Kotlin going long into the future.
- pjmlp 7y agoNowadays there are trying to just get Kotlin anywhere and it remains to be seen how Valhalla and Panama will be usable from Kotlin.
- thu2111 7y agoPanama would not seem to pose any problems as it's all code generation with MethodHandles/VarHandles. That should be directly callable from Kotlin. As for Valhalla, it remains to be seen how it's usable from Java, let alone anything else. But Kotlin already has a form of value type (inline classes) so perhaps it'll be an extension of that.
- pjmlp 7y agoKotlin inline classes are heap allocated, they are just syntax sugar for regular classes. One cannot just change their semantics after the fact.
- Nullabillity 7y agoKotlin's inline classes (and Scala's AnyVal classes) are syntax sugar for static methods. The object itself is erased completely whenever possible (just like primitive values).
- pjmlp 7y agoWhich is not the same as the semantic meaning of doing stack allocations or being stored in registers.
- Nullabillity 7y agoThe following: case class Foo(x: Int) extends AnyVal { def square: Int = x * x } val bar: Foo = Foo(5) println(bar.square) // => 25 Compiles down to (the moral equivalent of) object Foo { def square(x: Int): Int = x * x } val bar: Int = 5 println(Foo.square(bar)) // => 25 If the inner value (x, in this case) can be stack-allocated or stored in registers then `Foo(x): Foo` will as well. `Foo(x): Bar` (where Bar is a supertype of Foo) will be autoboxed, but that also applies to primitive types (`5: Any` becomes a java.lang.Integer in memory).
- pjmlp 7y agoNeither of those represent the same semantics of: inline class { ... ] Which is guaranteed to be always stack-allocated or stored in registers, again you cannot retrofit semantics, specially when passing those classes to binary libraries.
- Nullabillity 7y agoYou're correct that the Scala version isn't ABI-compatible. But Scala doesn't care about ABI between minor releases anyway, so that probably wouldn't stop them from changing it to align with Java. There is also precedence for this, Scala 2.12 changed the encoding of lambdas from anonymous classes to Java 8's invokedynamic.
- bitL 7y agoSUN was supposed to be here forever as well...
- zmmmmm 7y agoThat cuts both ways though. If JetBrains goes away or something shifts their corporate interest away from that then Kotlin has zero support at all. Whereas other languages are built on grass roots foundations. It's certainly unlikely in the short term but it's hard to say long term about the future of any company.
- The_rationalist 7y agoThis time this is the official android language and there is jetbrains behind it.
- fgonzag 7y agoKotlin is officially supported by Android which is huge, and the fact that IntelliJ dog foods their own product into their most important product also gives a degree of security about its future. Another huge advantage Kotlin has over Scala is tooling, which is basically all thanks to an IDE company creating the language. Tooling will never fall behind because they are in the business of selling tools.
- paulddraper 7y agoAs long as nothing bad ever happens to JetBrains. (You could say the same thing about Sun/Oracle...risks all around.)
- Nullabillity 7y ago> Another huge advantage Kotlin has over Scala is tooling, which is basically all thanks to an IDE company creating the language. Tooling will never fall behind because they are in the business of selling tools. Not sure I'd agree with this. Kotlin's ties to JetBrains means that you're basically hosed if you don't use IntelliJ. Scala's tooling works pretty much everywhere (LSP/Metals, ENSIME, IntelliJ, Eclipse/Scala-IDE).
- giggles_giggles 7y agoENSIME was abandoned several years ago because the maintainer felt bullied[1] and LSP/Metals has a ways to go. [1] https://medium.com/@fommil/hide-your-real-name-in-open-source-3d67e74a8c56 https://medium.com/@fommil/hide-your-real-name-in-open-sourc...
- The_Colonel 7y ago> Scala's tooling works pretty much everywhere (LSP/Metals, ENSIME, IntelliJ, Eclipse/Scala-IDE). Scala's tooling also pretty much sucks everywhere (interestingly the least sucking IDE for Scala is guess what ... Intellij!)
- Nullabillity 7y ago> Scala's tooling also pretty much sucks everywhere (interestingly the least sucking IDE for Scala is guess what ... Intellij!) In your opinion. Personally I almost get depressed when I have to switch from Emacs+Metals to Android Studio for Kotlin stuff.
- cies 7y ago> Dead It's being maintained. A new version (3 iirc) is about to come out. But it's not a hot bed of innovation. I think Kotlin now already has a lot more mindshare and corporate interest behind it than Groovy ever did.
- pjmlp 7y agoGroovy had first class support on Spring and Sun was doing talks at JSFDays on how it would become the JEE scripting language. Those of us that are part of the Java world since the early days, have been through this multiple times.
- The_Colonel 7y ago> Those of us that are part of the Java world since the early days, have been through this multiple times. Right, history repeats itself all the time ... until it doesn't. 10 years ago is not now, Kotlin is not Groovy ...
- pjmlp 7y agoIndeed, Groovy did not had an OS to sell it alongside.
- imtringued 7y agoGrails is 13 years at this point and still the only way to take advantage of the JEE Java ecosystem while also leaving your sanity intact. Since Grails 4 it is slowly moving away from Spring to Micronaut so the JEE ecosystem may die before Grails does.
- pjmlp 7y agoThat is irrelevant for Java as platform and programming language, just libraries that come and go, Java stays. Just like C on UNIX, JavaScript on the browser, ....
- dajohnson89 7y ago
- humbleMouse 7y agoI still love groovy, it doesn’t need to evolve that much to be useful for the things it’s good at, like parsing unstructured data and making boilerplate free pojos.