News for hackers. Stuff that matters.
Re:Kotlin M7 by netcraft on Thursday March 20, 2014 @10:16AM (#7435618)
I'm really rooting for kotlin - it seems like a good runner up to scala without the poor compile times. Looking forward to a 1.0 release
Re:Kotlin M7 by gecko on Thursday March 20, 2014 @10:26AM (#7435682)
Kotlin's brilliance is how much less it's trying to do. It's truly narrowly focused on fixing what's broken in Java—not introducing an entirely new language that happens to compile to the JVM. That'll make adopting it in organizations much easier, converting code to it much easier, and so on.

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.

Re:Kotlin M7 by thescrewdriver on Thursday March 20, 2014 @10:49AM (#7435830)
> I never figured out why Xtend (http://www.eclipse.org/xtend/) never caught on....

> ... 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.

Re:Kotlin M7 by gecko on Thursday March 20, 2014 @01:26PM (#7437102)
People have no real problem with languages that compile to C or JavaScript, so I'm not really convinced that's the problem as such. The lack of source maps/#line pragmas in Java didn't help, I'm sure, but these are solvable problems if there's interest (as demonstrated by #line and source maps).
Re:Kotlin M7 by Dewie on Thursday March 20, 2014 @11:45AM (#7436231)
> 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.

Re:Kotlin M7 by reactor on Thursday March 20, 2014 @11:21AM (#7436063)
I thing it's because of the pain you feel when you try to debug in Xtend (coz its compiling to Java)
Re:Kotlin M7 by hrjet on Thursday March 20, 2014 @03:29PM (#7437978)
To me Xtend seems like an ideal Java++. I actually like that it compiles down to Java.

The only hitch is that the Xtend is still very much a work in progress. It doesn't support inner classes and anonymous classes!

Re:Kotlin M7 by pjmlp on Thursday March 20, 2014 @11:49AM (#7436261)
Because we don't know what Eclipse wants to do with it.
Re:Kotlin M7 by lmm on Thursday March 20, 2014 @11:08AM (#7435956)
I'm not really seeing the case for Kotlin. If I want the most powerful language possible on the JVM, I use Scala. If I want a clean and elegant language, I use Ceylon - I don't think you can get that from a language that keeps the Java standard library. Prior to Java 8 I could maybe see the case for a language that's just Java with lambda and a few other niceties, but now that Java 8's out, if I'm going to go to the trouble of switching to a new language I want a bigger return on that cost than Kotlin offers.
Re:Kotlin M7 by pjmlp on Thursday March 20, 2014 @11:46AM (#7436246)
A good alternative for Java on Android given Google's fork and not so good support for Scala and Clojure on Dalvik/ART?
Re:Kotlin M7 by lmm on Thursday March 20, 2014 @12:14PM (#7436451)
Oh, I just wrote my (one, rather simple) android app in Scala. Are there problems with it?
Re:Kotlin M7 by pjmlp on Thursday March 20, 2014 @01:19PM (#7437034)
Executables are slower and bigger than Java even with ProGuard, specially given how outdated Dalvik GC/JIT are.

Maybe this will improve with ART.

Re:Kotlin M7 by pkuki on Thursday March 20, 2014 @04:10PM (#7438313)
Maybe they are slower to some extend, but for most cases it won't matter too much. I wrote simple game in scala and it was easy to constantly get 55-60 fps on newer devices: https://github.com/pkukielka/stronghold-defense

That being said I agree that jars are bigger and scala generates much more anonymous classes. Even with ProGuard that could be a problem on Android 2.3 or older. And ProGuard is a bit slow (for my game it was taking 30+ seconds for every build). Also Typesafe doesn't have plans for making scala first class citizen of Android.

So while Android development with scala is certainly possible there are few inconveniences which one should be aware of.

Re:Kotlin M7 by pjmlp on Thursday March 20, 2014 @04:32PM (#7438502)
Nice game!
Re:Kotlin M7 by thescrewdriver on Thursday March 20, 2014 @12:43PM (#7436734)
It tends to generate lots of anonymous classes, which can make your jar bigger.
Re:Kotlin M7 by mercurial on Thursday March 20, 2014 @10:22AM (#7435658)
I think it's massively less ambitious, which is a good point in its favour.
Re:Kotlin M7 by jes5199 on Thursday March 20, 2014 @10:26AM (#7435684)
It might be the least ambitious new language of the last ten years!
Re:Kotlin M7 by Avshalom on Thursday March 20, 2014 @10:35AM (#7435739)
I think that trophy is won pretty handily by Go.
Re:Kotlin M7 by tomp on Thursday March 20, 2014 @10:38AM (#7435753)
I wanted to say Go as well, but compared to any other possibly-mainstream languages, Go is very innovative - it has fibres/goroutines, channels, and structural typing/lack of class-based inheritance!
Re:Kotlin M7 by effn on Thursday March 20, 2014 @11:33AM (#7436149)
The bar for what counts as "innovation" in mainstream languages is strikingly low.
Re:Kotlin M7 by thescrewdriver on Thursday March 20, 2014 @12:45PM (#7436747)
All of which are available in other languages...
Re:Kotlin M7 by Avshalom on Thursday March 20, 2014 @01:15PM (#7437002)
In addition to the fact that none of it's features are particularly novel lets remember that Go's founding ambition was "compile faster than C++"
Re:Kotlin M7 by jfb on Thursday March 20, 2014 @01:59PM (#7437366)
And people disparage them for it, which is nuts. Google had a problem that they determined could best be solved by creating Go. So they did it, and presumably, they've solved their problem. That seems like a perfectly good use of incremental improvement.

Which raises an interesting point: what to people on the outside looks like a paradoxical combination of insane hubris and deep technical conservatism is probably simply what to Google's eyes looks like steady-state, responsible technical problem-solving -- c.f., hhvm and Facebook for a similar approach.

Re:Kotlin M7 by lanna on Thursday March 20, 2014 @11:30PM (#7440492)
> Go's founding ambition was "compile faster than C++"

And Kotlin's is "compile faster than Scala"!

Re:Kotlin M7 by rst on Thursday March 20, 2014 @11:14AM (#7435998)
Actually, Go's fairly successful melding of static typing and duck-typed interfaces was a useful new trick. (Which doesn't completely excuse the "C++ tried that and it didn't work for them so WE WON'T" foot-dragging on other matters...)
Re:Kotlin M7 by voidlogic on Thursday March 20, 2014 @11:35AM (#7436169)
>Go's fairly successful melding of static typing and duck-typed interfaces was a useful new trick

For those that don't know this feature is called structural typing: http://en.wikipedia.org/wiki/Structural_type_system

Also, OCaml uses structural typing too.

Re:Kotlin M7 by pjmlp on Thursday March 20, 2014 @11:51AM (#7436279)
No it was not, there are lots of languages that offer similar capabilities.

The fact that mainstream developers don't know it, does not make it something that Go designers invented.

Re:Kotlin M7 by eropple on Thursday March 20, 2014 @11:55AM (#7436299)
OCaml already had structural typing. Scala does too.
Re:Kotlin M7 by bguthrie on Thursday March 20, 2014 @12:22PM (#7436520)
Actually I think Hack might've just surpassed it.
Re:Kotlin M7 by tomp on Thursday March 20, 2014 @10:36AM (#7435749)
You mean, except Dart.
Re:Kotlin M7 by frowaway001 on Thursday March 20, 2014 @10:42AM (#7435779)
Let's just agree that Google couldn't design a language even if its life depended on it.
Re:Kotlin M7 by bryanlarsen on Thursday March 20, 2014 @11:33AM (#7436145)
How about "Google has a surprisingly conservative culture".
Re:Kotlin M7 by frowaway001 on Thursday March 20, 2014 @11:39AM (#7436197)
I wouldn't call "ignoring stuff from 1970" conservative.
Re:Kotlin M7 by thescrewdriver on Thursday March 20, 2014 @12:47PM (#7436769)
They're using Java very widely, you don't get much more conservative than that.
Re:Kotlin M7 by pron on Thursday March 20, 2014 @10:27AM (#7435695)
Plus, its interoperation with Java is so seamless, that adoption is both gradual and natural.