104 points · by microtonal · 12y ago · 88 comments
What Kotlin seems to be getting right so far is the useful side of functional programming features, IDE support, and a reasonably fast compiler. Compiler speed is something that Kotlin actually cares about, which last time I played with Scala, it was still dog slow to compile or even wait for it to decide to compile after you make a change.
Developer experience is very important to me and for the kind of software I want to build and the way I want to build it, Kotlin looks very promising.
If you want to optimize for only the compile dimension then Go and Pascal have very fast compilers. Python removes the need for compiling completely if that's really important to you (much faster than waiting for javac).
These days the only area where the "Scala is slow" mantra holds any water is with full builds, there, yes, cup of coffee time if you've got a large project ;-)
I think Kotlin will be squeezed from both ends (Java 8 and Scala) for uptake; that is, whenever the 1.0 stable release comes out -- sometime in 2015, right?
If so, around that time Scala 2.12 will have been released and Java 8 will have seen more & more adoption.
Will be fun to find out regardless, lots happening in JVM land these days.
I would recommend all Java developers to give it a try, especially if you use Intellij.
I'd like to counter the childlike moaning about Java being old and creaky and dated - JavaScript has been around since 1995 and was pretty much a laughing stock 10 years. Things change.
Clothes go in and out of fashion - so it seems do languages.
JavaScript has changed minimally since 1995 - but the changes that we've seen have been important. If V8 hadn't been written I'm not sure JavaScript would have had this resurgence. I also wouldn't advise anyone to assume big changes are needed to make Java more modern. The right small changes are enough (e.g. objects to C, or lambdas to Java) - I suggest that Kotlin (and very possibly Ceylon) have made the right small changes.
Right, off to write some COBOL Server Pages now ...
The benefit for Google and developers would be clear -- no more Java and Oracle shenanigans. Google already has a solid relationship with JetBrains due to the fact that Android Studio is just IntelliJ CE. They could hammer out details about who owns it, what the future looks like, etc. The transition would be easy since Kotlin already plays well with Java.
JetBrains would have a massive win as well since it would drive sales of IntelliJ like no other.
But I agree with you given the move to Android Studio, Kotlin would be a possible candidate as well.
https://github.com/search?q=stars%3A0..10000&type=Repositories&ref=advsearch&l=<lang>
Where <lang> is replaced with the language you're curious about. Here's a few: Kotlin 200
Dart 2,836
Erlang 9,087
Groovy 11,515
Go 24,603
Scala 25,846
While we've still got lots of catching up to do, I think Dart is doing pretty well given its youth. (I would include TypeScript in the above but unfortunately the language detection for it is broken so it reports a bunch of Qt C++ projects as TypeScript).Top 10 languages:
JavaScript 648,839
Ruby 512,620
Java 464,330
Python 323,857
PHP 319,106
C 169,390
C++ 165,497
CSS 141,254 //not Turing complete, but oh well
C# 111,748
Objective-C 107,682
JVM languages: Scala 25,854
Clojure 17,532
Groovy 11,520 //seems to be mostly picking up lone Gradle build scripts
Kotlin 200
Ceylon 60
Also: Typescript 3,042 //search function only intermittently fails
Dart 2,888
Big business language: Cobol 50I never get this trend to use Github to measure anything.
The broke seems to be intermittent only. The Groovy results seem to be permanently broken though - most of its results are multi-language projects where Groovy is used by a single Gradle build script.
It reminds me a bit of new devs who end up on Sybase database project and expect that "modern optimizers" always pick the right indexes.
That said, I never figured out why Xtend (http://www.eclipse.org/xtend/) never caught on, and it delivered most of what Kotlin is now offering, but with an even more Java-like syntax right out-of-the-box. Since Kotlin and Xtend are very, very similar, I suspect that Kotlin's ability to genuinely succeed will be mostly based on JetBrains' popularity how strongly they push it.
> ... with an even more Java-like syntax
I think you have your answer right there.
The other reason is that nobody likes the idea of having a language which compiles to Java source code.
Why not? It seems like a good thing if there is a possibility that you might have to go back to Java (if that make sense) or if some time down the road it is simpler for maintainers to go over to Java by reading the compiler output rather than dealing with xtend, if they don't know it. It could also be great if you want to quickly know what the equivalent of what you are writing in xtend is in java - just compile it. That seems more interactive than having to google or look up on StackOverflow.
Of course this assumes that the compiler output is actually readable.
The only hitch is that the Xtend is still very much a work in progress. It doesn't support inner classes and anonymous classes!
The world is moving on at a frightening speed when it comes to language design currently, largely thanks to Idris. The idea that some people think "hey, let's pick this language from 1995 and change it slightly" is going to cut it ... that's just mind-boggling.
All those new ideas in language design, are exactly that: new and unproven (like the Hindley-Milner type system, which, while quite old already, has not been proven to be a major strength, and it is certainly complicated, esp. its undecipherable error messages).
"Languages from 1995" (I don't know why you picked that specific year; some very successful languages are much, much older) have been used to build really good software, while "new" languages (Heskell, 1990; OCaml, 1996; Scala, 2003) have not proven to completely change software quality in a way just justifies their arguably less intuitive (if only culturally) designs.
Where are all the bug-free Haskell operating systems, drivers and embedded controllers? Where are the OCaml scalable severs? Where are all the Scala complex enterprise apps? I'm not saying there isn't any really good software written in those languages, but not nearly enough to prove a significant qualitative advantage.
On the other hand, when Java came out in 1995, it took maybe 5 years for pretty much the entire software world to adopt it, and it wasn't just marketing: its advantages were palpable and immediately apparent. I think (though I'm not sure), that C and later C++'s adoption was about as fast. If 25 year old languages like Haskell, and even 10 year-old languages like Scala, haven't shown such an immediate and enthusiastic widespread adoption, maybe their advantages aren't that extreme. Instead of those languages' designers sitting mind-boggled, maybe they should think long and hard about what it is that they're solving exactly and how important it really is.
I think the problems tackled by more "modern" languages are either not important enough, or their solution is far from optimal. For example, it is quite possible that a good type system could help produce good software faster (though it isn't certain either), but that this type system is Hindley-Milner seems unlikely at this point. Pluggable type systems (like the ones recently introduced to that 1995 language, and, I believe, also supported by Kotlin) might actually be a better way to go forward. I also think that some more important advances in programming languages have come not from PL researchers, but from developers (Java, Erlang, Clojure).
Haskell advantages are so extreme they elude most.
What were Java first 5 years advantages ? Wasn't it all 'Java is client-side silver bullet' ?
ps: by Pluggable Types did you mean Type Annotation http://openjdk.java.net/projects/type-annotations/ or just the Checker Framework ? http://types.cs.washington.edu/jsr308/
The most important innovation in the Hindley-Milner type system was parametric polymorphism, since that is the thing that enables you to build more powerful abstractions. Since the release of Java 1.5 and C# 2.0 that is now fully mainstream, but it took more than 25 years.
Any number of companies are still using C++, which itself took decades to reach the level of popularity that it did; Java is the exception rather than the rule in that regard. (And if we're just comparing popularity, I don't know how it is in your corner of the industry, but Scala growth has been massive over the last few years where I've been looking - and that's not based on Sun's marketing millions, but on word of mouth from people who're using it and finding that it helps them write better programs)
We're spinning in circles with frightening speed indeed, it's the linear speed we're lacking...
Kotlin seems to be one very good alternative in the future.
Their WebStorm IDE is partially done in Kotlin.
Android Studio is based on InteliJ and also supports Kotlin.
Ceylon is a me too JVM language from RedHat without eco-system around it.
Modern langs used like node.js, rails, django, go, grovy are all dynamic.