News for hackers. Stuff that matters.
Re:Kotlin: A Language with a Bright Future by adamnemecek on Monday November 20, 2017 @09:44AM (#15740143)
I agree 100%. Kotlin compiles to JVM, JS and very soon also to native via LLVM. That means you can ship a web app (both backend & frontend) and mobile clients (for android and soon iOS) in one language. This is unprecedented.

For JS, you can use all you favorite front-end frameworks like react (here's an example by JetBrains themselves https://github.com/Kotlin/kotlin-fullstack-sample) or cycle. And you can import typescript definitions.

Also first class IDE integration.

So yeah, bright future is an understatement.

I guess clojure/clojurescript and scala.js are somewhat similar however I feel like Kotlin has an insane amount of momentum behind it right now.

Re:Kotlin: A Language with a Bright Future by thomascgalvin on Monday November 20, 2017 @09:53AM (#15740221)
Kotlin is the first language I've gotten excited about in a long time. It's close enough to Java that I can get my engineers up to speed in a few hours, but it removed a lot of the bloat and tedium.

The JNV / JS / Native targets are also really promising, though I haven't played around with them much. The JS and Native runtimes are a bit limited since they don't include the Java standard library, from what I can tell.

Re:Kotlin: A Language with a Bright Future by adamnemecek on Monday November 20, 2017 @10:19AM (#15740451)
> The JS and Native runtimes are a bit limited since they don't include the Java standard library, from what I can tell.

I think that they ship with the Kotlin standard library which is close enough.

Re:Kotlin: A Language with a Bright Future by pankajdoharey on Monday November 20, 2017 @10:24AM (#15740496)
Cross Compilation isnt unprecedented various lisps have been doing it for decades. There are many lisp solutions thats do it already. Including Clojure which ships to Backend Frontend and Mobile Apps. Nothing new here.
Re:Kotlin: A Language with a Bright Future by adamnemecek on Monday November 20, 2017 @10:27AM (#15740532)
Not talking about cross-compilation, I'm talking about having a industry-grade, production ready language that I can ship stuff in like yesterday.

> various lisps have been doing it for decades

There's an insanely long road from having a prototype of a language to having a production ready thing. There isn't a lisp where I could achieve the same experience.

Re:Kotlin: A Language with a Bright Future by pankajdoharey on Monday November 20, 2017 @10:31AM (#15740565)
>I'm talking about having a industry-grade, production ready language.

It isnt a mature enough language to be trusted so soon, no body has a sufficient enough industry grade experience with it. Especially with large code bases.

Re:Kotlin: A Language with a Bright Future by adamnemecek on Monday November 20, 2017 @10:35AM (#15740600)
> It isnt a mature enough language to be trusted so soon,

I mean, Google adopted it as a first class citizen language on android which counts for something.

> no body has a sufficient enough industry grade experience with it. Especially with large code bases.

There aren't really any "new" features in Kotlin, as in features you haven't seen before. If you've been programming Java and know some Haskell/Ocaml or idk what else, you are good to go.

Re:Kotlin: A Language with a Bright Future by geodel on Monday November 20, 2017 @10:54AM (#15740761)
> I mean, Google adopted it as a first class citizen language on android which counts for something.

Something but not much. It works on JVM, talk to all Java libs and tooling is taken care by Intellij. It is low or little effort from Google to support. Unlike other language fans who clamor for Android support from Google, here hard work is done by someone else. So Google support looks most like a co-branding deal.

Re:Kotlin: A Language with a Bright Future by adamnemecek on Monday November 20, 2017 @11:15AM (#15740969)
Not what we are arguing about. We are arguing about if Kotlin is mature or not, googles invovelement is irrelevant.
Re:Kotlin: A Language with a Bright Future by qznc on Monday November 20, 2017 @09:50AM (#15740192)
> This is unprecedented.

C/C++ can do that if you accept Emscripten.

Java can do that if you accept GWT.

Re:Kotlin: A Language with a Bright Future by swsieber on Monday November 20, 2017 @09:52AM (#15740214)
Haxe can do it as well.

Though I think what really sets it apart (on the web side) is that it interops pretty well with other js libs.

I think what sets it apart is the interopability with it's current targets. Really slick

Edit:fixed typo

Re:Kotlin: A Language with a Bright Future by adamnemecek on Monday November 20, 2017 @10:02AM (#15740308)
> C/C++ can do that if you accept Emscripten.

Yeah, pls no.

> Java can do that if you accept GWT.

Yeah, I don't. Google abandoned it, you should too.

Re:Kotlin: A Language with a Bright Future by Finnucane on Monday November 20, 2017 @10:12AM (#15740398)
Still, they count as 'precedents'.
Re:Kotlin: A Language with a Bright Future by adamnemecek on Monday November 20, 2017 @10:17AM (#15740441)
Precedents are nice and all but I want something I can ship stuff in.
Re:Kotlin: A Language with a Bright Future by swsieber on Monday November 20, 2017 @10:48AM (#15740711)
Google still ships stuff using GWT - they just talk about it much.
Re:Kotlin: A Language with a Bright Future by adamnemecek on Monday November 20, 2017 @11:43AM (#15741182)
They maintain legacy stuff written in GWT, I dont know any new projects that use it.
Re:Kotlin: A Language with a Bright Future by qznc on Monday November 20, 2017 @01:58PM (#15742188)
Vaadin is built on GWT and seems quite alive. https://vaadin.com/
Re:Kotlin: A Language with a Bright Future by adamnemecek on Monday November 20, 2017 @02:21PM (#15742386)
Vaadin is doa. It’s not a spa which means it will be dead in idk three years. People love that interactivity.
Re:Kotlin: A Language with a Bright Future by beagle3 on Monday November 20, 2017 @10:45AM (#15740684)
Nim doesn't have a JVM backend, but it does C, C++, Objective-C, JavaScript, LLVM (not yet ready for prime time, but almost there), iOS, Android, and more.

Lisps have been doing this since forever (including the now defunct LinJ for Java which compiled into code that was very often mistaken for hand-written Java).

Hell, Emscripten takes everything LLVMable and gives it that ability.

> This is unprecedented.

Only for sufficiently narrow "this".

Re:Kotlin: A Language with a Bright Future by randomThoughts9 on Monday November 20, 2017 @10:30AM (#15740554)
> This is unprecedented.

Don't get me wrong, I like Kotlin, but Ceylon did the multi platform thing much better.

They have real platform modules, built into the language (not just a build tool trick), and a language specification that was written from the start with multiple platforms in mind.

But it never took off (yet), and Kotlin's support is good enough, so it will have to do I guess :).

Re:Kotlin: A Language with a Bright Future by venturis_voice on Wednesday November 22, 2017 @07:49AM (#15756344)
Hi, thanks for commenting on our recent blog post. We share and discuss all our content on Venturi’s Voice Slack group. Seeing as you know quite a bit about this topic it would be great if you joined the conversation on there. We’re a new community based around the blogs and podcasts we release everyday at Venturi. We aim to consistently deliver valuable content to our candidates - but we know there is always room for improvement, so your feedback would really help us out!

The group’s pretty quiet at the moment whilst we’re building up the community but stick with us as we’re aiming to grow it rapidly.

https://publicslack.com/slacks/https-venturisvoice-slack-com...

Re:Kotlin: A Language with a Bright Future by djm158 on Monday November 20, 2017 @09:49AM (#15740184)
You could also do this with JavaScript correct? Node.js back end with whatever front end framework and then use something like react native for mobile?
Re:Kotlin: A Language with a Bright Future by adamnemecek on Monday November 20, 2017 @09:57AM (#15740255)
But then you'd be writing JavaScript and who wants that. TypeScript is maybe ok-ish but TS is just putting a lipstick on a pig. Like, ignoring other issues, JVM at least has decent concurrency and with quasar, you get processes similar to erlang.
Re:Kotlin: A Language with a Bright Future by rictic on Monday November 20, 2017 @10:36AM (#15740615)
What about the other side of that coin. Does a small amount of idiomatic Kotlin compile down to a small amount of JS, or a large amount (in bytes, after gzip)?
Re:Kotlin: A Language with a Bright Future by adamnemecek on Monday November 20, 2017 @10:41AM (#15740648)
I don't have extensive experience with it but it's not too bad compared with other JS transpilers.
Re:Kotlin: A Language with a Bright Future by swsieber on Monday November 20, 2017 @09:55AM (#15740239)
That's not quite there though - with React Native, your still running the js engine to run the JavaScript (but your at least using native widgets).

With Kotlin you'll be running compiled code. If you wanted to right now though, you could (should be able to?) use Kotlin to build a React Native app with it's just target.

Re:Kotlin: A Language with a Bright Future by brango on Monday November 20, 2017 @10:50AM (#15740732)
I was looking into this yesterday. Apparently while there's support for transpiling Kotlin -> JS, more work would be needed to support transpiling for react native[1]. Not sure why.

[1] https://blog.jetbrains.com/kotlin/2017/04/use-kotlin-with-np...

Re:Kotlin: A Language with a Bright Future by stewbrew on Monday November 20, 2017 @10:59AM (#15740817)
Since the kotlin runtime is rather small, you still have to deal with platform differences.

I like kotlin for several reasons but this one isn't on the top of my list. If you like cross-platform development, you might want to check out haxe.