
Kotlin Goes Open Source - bad_user
http://blog.jetbrains.com/kotlin/2012/02/kotlin-goes-open-source-2/
======
pron
While Clojure remains my favorite JVM language, I think Kotlin is the first
language to have a fighting chance at replacing Java as an industry-wide blue-
collar language. It doesn't try to solve programming's problems with new
approaches like Clojure and Erlang; on the contrary - it's meant to let
programmers continue thinking more or less as they have been thinking so far,
but it has all the modern features and a good balance of power vs. ease of
use/learning. It's what Java was 17 years ago.

~~~
moondowner
Can you compare Kotlin with Ceylon [<http://www.ceylon-lang.org/>]? I'm very
interested in what's the core/main difference between them and will be better
in which use-cases.

~~~
pron
I think the main difference is Java interop. Kotlin is fully compatible with
Java and Java libraries, while Ceylon is not quite (the Ceylon FAQ says:
"since Ceylon will be based on its own modular SDK, making a clean break from
the legacy Java SDK, Ceylon will require new frameworks designed especially
for Ceylon").

~~~
chaostheory
How does it compare with Scala?

~~~
pron
Well, this is a sensitive subject. Scala is no doubt more powerful and has
some awesome features, but I'd say that Kotlin has 99% of the features 99% of
Scala developers choose Scala for in the first place (in other words, those
Scala features that Kotlin is missing are not the ones that made most Scala
developers choose Scala), while it is far easier to learn (in its entirety).
Also, IDE support is far superior, and will remain so (because some Scala
features, like structural types, make some actions like refactoring impossible
at times). Also, it compiles to Javascript as well as to Java bytecode.

~~~
chaostheory
Sorry I wasn't more specific. How does it compare with Scala's Java
compatibility? I know that Java compatibility is one of Scala's strengths, but
the more I read, it also seems like it's one of its biggest weaknesses.

------
thebluesky
Nice to see them dropping the silly "System.out" prefix for println. A minor
point, but it was rather silly. See other Kotlin examples here:
<http://kotlin-demo.jetbrains.com/> Kotlin copies much of its design and
syntax from earlier Scala versions e.g. the use of companion classes,
constructor syntax etc. but leaves out some of the most useful features found
in Scala today. Kotlin, unlike Scala cannot make existing classes implement a
new interface, nor can it do structural typing
(<http://codemonkeyism.com/scala-goodness-structural-typing/>). It would be
great if they added these features, without them I feel like I'm getting a
poor man's Scala. The only consolation is that Kotlin does string
interpolation, something which is being added to Scala 2.10 anyway.

~~~
pron
I don't want to get into an argument over Scala, but let's just say that Scala
has some _really_ cool features from a language design perspective, but many
of them come at a _HUGE_ cost to ease of learning or reading code, or to IDE
support. Scala's power, which is without a doubt very impressive for a
statically-typed language, comes at a price which many organizations are
unwilling to pay.

~~~
thebluesky
Do you have data to back up that claim? The only example I've come across is
Yammer. Real world adoption data paints a different picture, one of rapid
adoption of Scala by both start-ups and more traditional organizations like
banks: see: [http://thecodegeneral.wordpress.com/2011/11/27/scala-
adoptio...](http://thecodegeneral.wordpress.com/2011/11/27/scala-adoption/)
and [http://highscalability.com/blog/2012/2/13/tumblr-
architectur...](http://highscalability.com/blog/2012/2/13/tumblr-
architecture-15-billion-page-views-a-month-and-harder.html)

~~~
pron
I just compare Scala's growth to that of Java or even Ruby (since RoR). I also
think that this adoption is not the result of Scala's power features but in
spite of them (really, there was little choice in the statically-typed JVM
languages). But I really have no skin in this game, and Java does need a
modern replacement to fill a certain niche, and I have a hunch it will be
Kotlin.

~~~
soc88
Is this a theoretical thought or a practical consideration?

I think the Java ecosystem needs a good, mature language now ... and I fear
Kotlin is still at least half a decade away from being stable. While Kotlin
compares nicely to Java 7, we need to keep in mind that both Java and Scala
won't stop being developed. So pragmatically speaking, it will need to compete
against Java 12 and Scala 2.16.

------
raphinou
I feel like we see the same things with languages as we had with version
control. For a long time, you had only CVS, then you had (too) many options to
choose from: monotone, darcs, mercurial, git, and I certainly forgot some.

Now, we see new languages appear (and get some exposure) at a frightening
pace: Rust, Go for system programming, and on the JVM: XTend, Ceylon, Kotlin,
Clojure, Scala, Groovy, etc

It's great to see things move, but when you have so many option, it can be
hard to make a choice. I expect some of these to take the lead, like git seems
to be doing in the DVCS space.

~~~
bishop_mandible
Every company wants to have control over its own programming language. Even
more since Oracle sued Google over Java.

Microsoft -> C# Google -> Go, Dart Apple -> Objective C Oracle -> Java VMWare
-> Groovy Red Hat -> Ceylon JetBrains -> Kotlin Mozilla -> Rust

Facebook and Amazon should invent their own languages as well.

~~~
bad_user
Oracle hasn't sued Google over the usage of Java the language. And going with
Kotlin or Groovy won't protect you from Oracle.

------
acuozzo
Great job, JetBrains! `Going open' (as either OSS or FOSS) seems to be the
only logical decision for a programming language. Proprietary programming
languages rarely stand the test of time, even when they're awesome.

------
bwarp
I'm suspicious of ANOTHER language. There are too many already.

Regulation XKCD: <http://xkcd.com/927/>

~~~
bad_user
What's a "meta-language"?

~~~
bwarp
A description of a language in another.

~~~
lemming
Kotlin compiles to bytecode - it's no more a meta language than Java itself by
that definition.

~~~
bwarp
I've revised my original comment now. Thank you.

------
joshbaptiste
Hmm.. so in essence Kotlin could be used as a drop in replacement for Android
programming.

------
soc88
If the language is "much simpler than Scala", why do I get stuff like this?
:-)

<http://imgur.com/EaxXZ>

~~~
thebluesky
That's quite an error for such a small piece of code... None of the following
functions can be called with the arguments supplied: final fun <T:Any?,R:Any?>
Array<T>.map(var result:Collection<R>,var
transform:Function1<T,R>):Collection<R> defined<java_root>std final fun
<T:Any?,R:Any?>Interable<T>.map(var result:Collection<R>,var
transform:Function1<T,R>):Collection<R>defined in <java_root>.std

