18 ms·
What was the need that Kotlin arose out of?
by nchelluri 11y ago
What was the need that Kotlin arose out of?
- hhariri 11y agoTo summarize, we were looking for a language that could cut down our code base (IntelliJ platform and server side tools are written in Java), be concise but still expressive, toolable, as fast as Java, easy ramp-up time, and very important, interoperable with all the existing code base we had. Given the candidates at the time, it was decided to start Kotlin.
- connor4312 11y agoBased on my admittedly limited experience in the JVM world, your needs sounds like Scala's sales pitch. What factored in to your decision to develop Kotlin, rather than going with Scala?
- pron 11y agoThe two languages have completely different philosophies. Kotlin is a strict adherent of the Java philosophy[1], a "blue collar language" that adopts only tried-and-true features, with PL research being a non-goal. Scala OTOH, adopts almost every new PL concept, and PL research is very much one of its goals. A quick look at Scala's list implementation will show you how different those languages are. Kotlin is a modern Java; Scala is a Haskell/OOP/macros combo. Yet, I think many of Scala's users will find that Kotlin gives them all they need, in a much simpler, more readable and maintainable language. If, however, you're aching to write type-safe monad transformers, you're bound to be disappointed by Kotlin. [1]: http://www.win.tue.nl/~evink/education/avp/pdf/feel-of-java.pdf http://www.win.tue.nl/~evink/education/avp/pdf/feel-of-java....
- adriaanm 11y agoAs the Scala tech lead, I'm glad to learn we've finally adopted "almost every new PL concept!" I guess by now everyone will recognize your username and adjust for bias accordingly, but still, how about sticking to the facts?
- rattray 11y agoAs someone who doesn't follow such things (eg; I don't recognize the "pron" or "adriaanm" usernames, and haven't used Scala or any other JVM language), I found your comment to be a turn-off towards using Scala. That's not the kind of mature tone I'd look for from the tech lead of an open-source language. That said, it is good to know that "pron" was incorrect/exaggerating when they said Scala adopts a lot of PL concepts; thanks for setting the record straight (though I'm still just not sure where Scala stands on that after reading this).
- virtualwhys 11y agoFYI, pron's the author of a would be competing project to Scala's Akka (i.e. competing for share of distributed computing market on the JVM), and takes every opportunity to danger-danger-dragons-be-there on Scala related threads/comments. Saying that, there is always some truth in what pron brings to the table, it's sort of a higher kinded trolling ;-) As for Scala and PL concepts, sure, plenty on offer if that's of interest, but not at all a requirement in using the language. A great example of a highly successful project based on the non-FP-centric aspects of Scala is Spark. See their high performance computing style guide [1], no monad transformers there... [1] https://github.com/databricks/scala-style-guide https://github.com/databricks/scala-style-guide
- ninjakeyboard 11y agoWhat is a pron? That's like a shrimp?
- saryant 11y agopron is the author of the GGGP post to the one you replied to.
- pron 11y agoFYI, I had taken "every opportunity to danger-danger-dragons-be-there" Scala — on record — years before I even dreamed of the database company that would one day have an open-source project which would end up competing with Akka (I'm talking 2009/10, while Quasar was first conceived in mid 2013). It was after leading an attempt to adopt Scala at a large organization, which failed because of what I saw as Scala's bait-and-switch marketing: it presented itself as "a better Java" while it really was (and is) a strict-Haskell-with-OOP-and-macros-and-more. We needed a car and got a helicopter. While some would consider a helicopter superior to a car, I think everyone would agree it imposes a completely different set of tradeoffs. So yeah, for a good while I was telling people, listen, it's a helicopter, so make sure a helicopter is what you want (the Scala community’s response was, what is this FUD? Can’t you see it's got wheels?! You can drive it on the ground if you want; you don’t have to take off! To which I responded, but you still can’t take it to a car garage for maintenance, to which their response was, you’re a stupid biased troll!). I don't remember when was the last time I participated in a Scala thread, but that community doesn’t forget. So if I'm damned if I don't, I might as well do: Spark is a good example for a project that would have been better off using Kotlin. They wouldn't have missed any Scala features, would have had better build times, better IDE support and better Java interop (of course, Kotlin wasn’t mature enough to even be considered when that project started). In fact, using Kotlin would have saved them writing 95% of that style-guide[1], which reads like instructions on how to drive a helicopter on the ground without accidentally taking off (Perhaps ironically, that style guide drew derision from the Scala community, who said, you're in a helicopter for fuck's sake! Why won't you take off?!) [1]: No implicits, no multiple argument lists, no Try, no infix notation, no non-math operators, no recursion, no being-fancy-with-monads, no Scala concurrent collections, no Scala collections, no for loops. They don't mention dynamics and structural types, but I think it goes without saying that they're off-limits, too.
- badlogic 11y agoI can't speak for JetBrains, but from my own experience with Java, Scala and Kotlin, Java interop in Kotlin is a lot better. Scala also offers a lot more features than Kotlin, which is great for highly experienced programmers, but usually means having to subset Scala for mixed experience teams. Kotlin seems to strike a better balance in terms of approachability and expressiveness, and hence being better suited for teams of different experience levels.
- hellofunk 11y agoWhere would Clojure fit into this mix? How would its interop compare with Scala or Kotlin, as well as its performance?
- pjmlp 11y agoClojure devs don't seem to care about performance. Just check how the JVM gets the blame for what is essentially Clojure initialization time. There are some in the community trying to improve the situation, but those are kind of forks like Skummet.
- KirinDave 11y ago> Clojure devs don't seem to care about performance. Ridiculous. Clojure devs care a lot about performance. We just care more about correctness.
- hellofunk 11y agoBy "performance" I think you specifically mean "startup time." I think there is a big difference between startup time and runtime performance. It is well-known and fully acknowledged by the Clojure community that starting up a Clojure environment and REPL takes a while. But are you also suggesting there is a problem with Clojure runtime performance?
- pjmlp 11y agoI got that understanding given how performance improvements get postponed version after version. Apparently they will be coming on 1.8.
- hhariri 11y agoScala was our primary candidate, but there were issues back then, namely in terms of compiler performance and also tooling. Tooling isn't easy for Scala, and I believe compiler speed, Kotlin is already faster than Scala in terms. Also, we want to continue to provide support for JDK 6 thru 8.
- mahmoudimus 11y agoThere's still issues with Scala today.
- JustSomeNobody 11y agoThere's like 9000 programming languages. Not a single one was adequate? Color me skeptical.
- blowski 11y agoIt seems that Kotlin was adequate, which is why they chose it. With no idea of the project or the team working on it, I'll assume good faith that they were right.
- JustSomeNobody 11y agoOr yak shaving? I remember reading comp.compilers for a long time and people would always post about creating the next great language. They first thing people (usually John Levine) would ask it, "Why does the world need yet another programming language?" Not necessarily to discourage, but to invoke thoughtfulness. There's nothing wrong with new languages. But it seems people are popping them out left and right these days. I think Javascript frameworks are the only thing that come faster. So, do we _really_ need yet another new programming language? Down vote me all you want, but at least I ask the question.
- carterehsmith 11y agoWell, 99% of those are silly little "my first programming language" thingys, and these are easy (if you care about those things) to recognize and ignore. They invariably focus on syntax: removing the semicolon, or braces, or some other trivial thing along these lines. BTW even those can be useful for PL researchers as the language may have an interesting new idea or a new way of doing things. Highly unlikely, but does happen. On the negative side, and this is really bad, some of these may be picked up simply because they are new, and then they just create negative value for people that pick them up (e.g. Coffescript) and fragmentation. Then they get abandoned because there is another newer thing. Sad. Then there a languages made by people with background in creating viable (as in not-just-academic) languages. Typescript and Go comes to mind. These are good and "we" need them. These may add new features to the table, eg generics or union types or goroutines. There is no easy answer to your question, my best answer is "depends on who made it".
- throwaway999777 11y agoWas there a need to develop a Java IDE in Java to begin with? I can understand dog fooding by building IDE-primarily-for-lang in lang itself. But were there technical reasons? Or maybe Java just was the best alternative [at the time].
- hhariri 11y agoThe three founders of JetBrains started a plugin named Renamer out of need, while working with Java code at TogetherSoft. That was over 15 years ago.
- pbh101 11y agoAs a user of it, I appreciate that I've been able to use it on three different OS's with minimal adjustment, which Java facilitates more so than other languages, especially other languages which would be reasonable candidates for a thick-client application like this.
- mike_hearn 11y agoIt's worked out pretty well for them I'd say. Consider that any developer can write a plugin for it easily, that cannot segfault the entire app, and which runs on all the platforms the IDE supports. That's just one advantage. Higher productivity of feature development is probably another. To see how things could have been different, look at Visual Studio which is still a 32 bit program even in 2015. Users of it complain that it simply can't load big projects without running out of RAM even if their computer has enough. The VS team says they aren't doing a 64 bit port because it's such a big code base and besides, their plugin model is fully native. And of course it's Windows only.
- throwaway999777 11y ago> Higher productivity of feature development is probably another. So productive that they had to invent a new language for the JVM platform?
- mahmoudimus 11y ago
- carterehsmith 11y agoOK, so did Kotlin really cut down your codebase, and by how much?
- hhariri 11y agoWe've not converted entire code bases, but based on what we're doing and feedback from others, we could say roughly around 35% or so.
- justthistime_ 11y ago> be concise but still expressive, toolable, as fast as Java, easy ramp-up time, and very important, interoperable with all the existing code base we had ... and when you went to the Scala developers, they said "no, we aren't interested in such improvements at all, even if you implemented them yourself"? Hard to imagine...
- steedsofwar 11y agoThis may provide some insight: http://blog.jetbrains.com/kotlin/2011/08/why-jetbrains-needs-kotlin/ http://blog.jetbrains.com/kotlin/2011/08/why-jetbrains-needs... The nice thing about that post is that they (Jetbrains) are pretty honest about the whole things e.g. "First and foremost, it’s about our own productivity." "The next thing is also fairly straightforward: we expect Kotlin to drive the sales of IntelliJ IDEA. " "The final point is less obvious but still important: new programming languages is a topic that many people really enjoy talking about, and the first days that have passed since we’ve unveiled Kotlin prove that." "And we’d like to reiterate that our work on Kotlin does not in any way affect our investment into other development tools, and in particular the Scala plugin. If you’re already happy with Scala and have no need for another new language, we’ll continue to do our best providing you with first-class Scala development tooling."