14 ms·
Rise of Kotlin: A Programming Language for the Next Generation
- ythn 8y ago> First off, I was genuinely surprised by the love students and more junior developers are giving Kotlin. This seems to indicate that the "love" Kotlin gets is mostly fad motivated. Just like younger generations reject the haircuts and "cool" slang the older generation uses, the same younger generations reject older programming languages in favor of fashionable, glamorous, new ones. Java went from being THE trendy fad language to the old fogey that everyone mocks and derides.
- weberc2 8y agoThis explanation seems to get thrown at every new programming language. Maybe Kotlin is a fad, maybe it's not (I've never used it and don't have an opinion)--either way, comments like this one aren't very insightful or convincing.
- justaman 8y agoKotlin seems to either have a lot of advocates or a strong marketing department. Its almost like a advertising company supports it.
- zellyn 8y agoJava was cool at allowing a couple of things nothing else did: applets, and an actually cross-platform language. But the language itself never seemed “cool” — it horribly verbose even from the start. In fact, it's much better now than it was.
- bryanlarsen 8y agoJava was very definitely "cool" in the 90's.
- KirinDave 8y agoPlease consider that the competition was 1990's era C++. For every way Java's old versions were bad, C++ was bad in 3 distinct ways that often lead to program faults. Folks left old-C++-world like it was plague infested when they could, because it was a genuinely unforgiving environment to program in and no one took Objective-C seriously outside of the world of NeXTSTEP.
- ythn 8y ago> But the language itself never seemed “cool” The author of "Joy, Inc." disagrees with you https://www.amazon.com/Joy-Inc-Built-Workplace-People/dp/1591847125 https://www.amazon.com/Joy-Inc-Built-Workplace-People/dp/159...
- pjmlp 8y agoIt was surely cool in 1996, vs Frankenstein C compilers still stuck between K&R C and Ansi C (hello aCC), C++ compilers playing catch up with ongoing ISO work. Then there was VB 6, Delphi, Eiffel, Oberon, Modula-3, Component Pascal, Smalltalk, Common Lisp and a few others more. Big difference was that Sun was giving the JDK away for free every way they could. Magazine CDs, conferences, sending them free by post, whatever. I was on my last year and everything that had to do with distributed conputing or compiler development switched to Java. With teachers carrying Java branded bags.
- AnimalMuppet 8y agoTwo other cool things about Java: The library. It had everything. Garbage collection. You didn't have to keep track of when to free memory any more. If you were in C or C++, this meant a major headache just... went away. (If you were in Common Lisp, well, you never had that headache in the first place...)
- pjmlp 8y agoQuite true. I already used Oberon, Caml Light, Prolog and Smalltalk by then, but it was the way Sun was pushing it no matter what that actually made it mainstream, regarding GC adoption. If I am not mistaken it was Guy Steele that stated it brought developers half way to Scheme. As for the library I remember the first commercial Java collections based on the ongoing C++ STL work, before Java 1.2 adopted their own, with a few similarities to Smalltalk ones. C++ on those days had each compiler vendor provide their own view of what a C++ framework should look like, and although RAII was already a thing, very few of them already offered some way of doing smart pointers, with the exception of COM wrappers.
- igouy 8y ago> As for the library … with a few similarities to Smalltalk ones. And the recapitulation of emulated versus native Smalltalk UIs, with Swing versus SWT.
- 8y ago
- igouy 8y ago> …nothing else did … cross-platform language Au contraire! http://www.davethomas.net/papers/ubiquitous1995.pdf http://www.davethomas.net/papers/ubiquitous1995.pdf
- ptx 8y agoThe part you quote is followed by: "I was expecting a bigger difference between more/less experienced developers, ..." So the article is saying that there is lots of Kotlin love from experienced developers (and this is as expected) but they were suprised to also see similar results with junior developers and students. The text of the survey resluts page (linked in the article) makes the same point somewhat more clearly: "In its early days Kotlin was being picked up mostly by experienced and professional developers, but since the announcement its usage has exploded with newer developers, especially students."
- bogwog 8y agoMy takeaway from this is that Kotlin appeals to junior/inexperienced developers, cargo-culters, and JetBrains developers.
- Larrikin 8y agoAfter using scala, it was hard to go back to Java. After learning Kotlin and reading others scala code I don't see myself using any other JVM language besides Kotlin unless I'm forced to. I never minded Javas verbosity because I liked the type safety, but after experiencing languages without it java just becomes annoying to right. Scala was great initially, but because they put every concept ever thought of into the language it becomes a mess because people pick and choose from all the esoteric options. Kotlin is a happy middle ground to me.
- eklavya 8y agoEasy/common things should be easy and hard/uncommon things should be possible. So it's scala for me :)
- pjmlp 8y agoAnd Android devs that would otherwise be stuck using Java 6. There is partial support for Java 7 and 8, but it is a matter how many Android versions one wants to target. Don't forget Java is not only the language, rather standard APIs, bytecodes and .class formats. Also it doesn't appear Android will ever move beyond Java 8.
- otachack 8y agoIt does but it also appeals to experienced devs. One person made a point how it allows Android devs to use a wider toolset than the current restricted Android JDK allows. Personally, I've used Java for Android dev for 2 years and Kotlin feels like a breath of fresh air, just like Obj-C to Swift transition.
- DrBazza 8y ago> One takeaway is that Kotlin is an exciting language, and one that makes developers happy. Context? Probably "makes (Java) developers happy" due to dramatically reduced verbosity. But you get that in most, if not all other languages too. It's not called the Kingdom of Nouns for nothing.
- flavor8 8y agoAnecdata: I've had three lifelong Python devs on our team independently tell me that they don't want to do Python anymore, after working in Kotlin for a month or two. It's really a great middle ground between Java and Python.
- V-2 8y agoIn terms of "niceness" I prefer Kotlin not only to Java, but also to C#; another language in which I've coded professionally, and one I hold in high regard. Although there's certainly much less of a gap between Kotlin and C#.
- KirinDave 8y agoIt makes Android developers very, very happy because it brings features and fixes issues they have. They're stuck on a very old version of the Java spec, remember. They don't really have great options for other languages because of the huge amount of specialized executable optimization and processing required to ship on Android. It'd be awesome if we could see a similar uptake in Eta or something like that. But it's unlikely, as making Eta equally efficient on Android will be a full on PhD thesis of work on top of a mountain of integration work JB finances to get the tooling perfect.
- pjmlp 8y agoAnyone that calls that to Java never programmed in Objective-C, which is like Java's grandfather.
- dgritsko 8y agoSteve Yegge had an entertaining and informative post last summer describing his own experience with Kotlin and his thoughts on what makes it a compelling language. It's a great read: https://steve-yegge.blogspot.com/2017/05/why-kotlin-is-better-than-whatever-dumb.html https://steve-yegge.blogspot.com/2017/05/why-kotlin-is-bette...
- cwyers 8y agoA lot of this seems to be driven by Android developers who are locked into an older version of the JVM because of decisions Google has made. In other words, Kotlin is taking improvements from languages that target other environments (the CLR, native compilation or even newer versions of the JVM) and giving them to programmers who are stuck on a version of the JVM that isn't seeing any progress.
- pjmlp 8y agoYes, Google has radio silence on adopting anything beyond Java 8. And even for Java 8 you need a latest Oreo device, because not everything can be desugared into Java 6. There is also the issue that going forward Java 9+ libraries won't be possible in Android. So the only way forward appears to be indeed Kotlin and Kotlin specific libraries.
- ajoy39 8y agoProbably has something to do with that ongoing lawsuit with oracle
- pjmlp 8y agoEasily avoidable if Google had not screw Sun in first place, and if they bothered to buy it afterwards when Sun went bankrupt. Apparently they thought they could get away with it. And there are still lots of jars on Maven central that are unusable on Android Oreo. Because even after switching to OpenJDK, they cherry pick APIs from there and ART does not support all JVM bytecode features.
- repolfx 8y agoI don't think it's that. They switched to OpenJDK a while ago. It seems to be more that they don't prioritise keeping up with the Java ecosystem very much, they'd rather work on their own stuff. It's more a cultural issue than anything else IMO. Google has always had a big NIH problem.
- jayd16 8y agoAndroid doesn't use the JVM. They're slowly rolling in newer Java language features bit by bit though. Switching languages only helps the syntax. If the Android Runtime can't do something it that means it can't do it in Java or Kotlin.
- pdpi 8y agoI've been doing Kotlin on the backend for a while now, and I can't recommend it enough. One of the things that I really enjoy about the language is that it is _not_ a clever language. It's not trying to revolutionise PL theory, it just wants to get out of your way and let you get on with it. This shows up as the language being mostly worried about bringing well-understood modern conveniences into the Java world (interface delegation, property delegation, data classes, generic variance, type inference, etc). On top of that "modernised Java" base, the language then adds only a small set of clever new features (mostly inline functions and receiver lambdas), and it leverages the hell out of those few features to produce a lot of value — e.g. there is no try-with-resource in Kotlin as a language construct. It's implemented as an inline receiver function that takes a receiver lambda as an argument.
- deleted 8y ago[deleted]
- k__ 8y agoAn Android dev told me, it is between JS and Java, some low-level stuff is harder, but most day-to-day tasks are really simple and you can always fall back to Java if you like. Sounds nice.
- pdpi 8y agoHuh. I'd be interested to hear what low-level stuff they thought was harder than in Java. Can't think of anything you can do in Java that can't be done at the same abstraction level in Kotlin.
- kevinslashslash 8y agoMy guesses would be handling unsigned hex https://youtrack.jetbrains.com/issue/KT-4749 https://youtrack.jetbrains.com/issue/KT-4749 And bitwise operations https://discuss.kotlinlang.org/t/when-does-bit-fiddling-come-to-kotlin/2249 https://discuss.kotlinlang.org/t/when-does-bit-fiddling-come... And maybe handling generics. I haven't had any issues, but kotlin is a bit stricter which is generally a good thing, but I'd believe that for some edge case it makes things harder.
- KirinDave 8y agoIt's pretty sad that F# is sitting on the sidelines wondering what it did wrong to not get these accolades. I guess, "Being unable to enter a mobile ecosystem that's being held on a very old language runtime," is perhaps not the most desirable outcome for Android but dang if it hasn't worked out well for Kotlin's press. People are going TO Kotlin as opposed to the usually Ocaml/F#/Haskell/Idris/Agda world of the community trying to bring people in.
- olavk 8y agoKotlin is competing against Java, while F# is competing against C#. F# is a great language, but so is C#. MS has done a really great job evolving C# away from a Java clone. C# keeps adding features inspired by functional languages, narrowing the gap to F#. Of course this makes it easier to switch, but on the other hand it also makes it less interesting.
- bunderbunder 8y agoThere's an argument to be made that F#'s place in the .NET ecosystem is to be a feature sandbox for C#. When F# first dropped, I was instantly in love. It was just so much nicer than C#, which was already nice. But, in the intervening years, C# has been adding new features at such a steady clip that it's hard for me to have such strong feelings anymore. Stylistically I like to have algebraic types and pattern matching, but from a practical perspective I think the two languages probably offer about the same level of productivity.
- systems 8y agofrom where do you get that F# is sitting on the sidelines? i see more books and open source projects for F# than kotlin, which for a while made me skeptical about the truth of kotlin popularity
- KirinDave 8y agoI talk to a lot of Android folks. Most have already made the switch, and consider the growth of the language "explosive". That Google is opting in there only makes it better. F# has been around a long time and while it's experiencing modest growth and I think it has a positive track, I've certainly never seen it hyped and on the tip of every tongue the way Kotlin now is within the Android space.
- newcrobuzon 8y agoI would wonder: is there any person with (enough of) experience with both Clojure and Kotlin to say how these two compare together as Java alternatives? Couple of years ago I was looking for "Java.next" and back then I chose Clojure. Needless to say I have been sooo happy with the language... Now for past year or so I have heard so much praise on Kotlin - it always came from Java devs and it seems like a great language with great support from IntelliJ and I am very enticed (but sadly have not enough time to play with it). So I'd wonder how this language is perceived by fellow people from Clojure community...
- poe876 8y agoKotlin is bullshit.
- swsieber 8y agoI'm somewhat familiar with Kotlin, but not really with Clojure. My impression is though that Kotlin really just tries to make a less painful Java, whereas Clojure is a better/nicer JVM language.
- yogthos 8y agoKotlin is basically a flavor of Java that cleans up some syntax quirks, and adds some new ones. I think it's overall a cleaner language than Java, but it's not fundamentally different from it. I certainly wouldn't view it as a next generation language. I think it's important to step back and consider the history of programming languages to understand why mainstream languages look the way they do. Hardware was very limited in the 70s. The Intel 4004 CPU that came out in 1971 clocked in at 740 kHz, and it was coupled with a few kilobytes of memory. So the language had to be optimized to squeeze every last possible bit of performance from this limited hardware. You didn't have to worry about concurrency, there weren't any consumer grade multicore CPUs, and networking wasn't prevalent at the time. C solved that problem very well. It was effectively portable assembly allowing you to write extremely efficient code that could be compiled across different architectures. Meanwhile, advanced languages like Lisp required super computers at the time, and only a small number of people was lucky enough to work with them. So, a whole generation of programmers grew up on C, and they went on to design languages that look like C. The problems we face today are completely different from those we solved in the 70s. We work with much larger codebases, we often work in teams, we have multicore chips, and networking is prevalent. Things like managed runtimes, GC, and threading that were absurdly expensive in the 70s are common today, but C family of languages aren't optimized to take advantage of that. Raw performance is no longer a priority because developer time is far more expensive than hardware. This means that we need to optimize for clean and maintainable code that's concurrency friendly. Languages like Clojure and Haskell are a new breed of languages that are designed to solve modern problems, and that's the fundamental difference between Kotlin and Clojure in my opinion.
- stewbrew 8y agoKotlin is a nice language but being tied to jetbrains with no useable ide/editor around but jetbrain's own idea it won't rise that high. A working lsp language server would help.
- wpdev_63 8y agoI agree that they should implement a language server but they do have an eclipse plugin[0] that they develop. It's very generous of them to do. [0]:https://github.com/JetBrains/kotlin-eclipse https://github.com/JetBrains/kotlin-eclipse
- stewbrew 8y agoThe eclipse plugin sometimes doesn't provide the best developer experience though. I doubt they would accept that for intellij idea.
- valw 8y agoI have nothing against Kotlin, but we should be much more ambitious for the Next Generation of programmers. There's so much more progress to be made in (mainstream) programming languages than the tiny step from Java to Kotlin. As it has always been in the history of programming, what it takes for this potential to come true is for the current generation of programmers to retire, leaving room for fresh paradigms. Imagine if all the industry got one generation after Assembly language was "hey, we've made the instruction codes shorter and an IDE that can navigate to line numbers".
- maxxxxx 8y ago"hey, we've made the instruction codes shorter and an IDE that can navigate to line numbers". That's almost what happened with C. In general I agree with your point though. "As it has always been in the history of programming, what it takes for this potential to come true is for the current generation of programmers to retire, leaving room for fresh paradigms." Not so sure about this. I see more of a trend to repeat previous errors because the industry as a whole quickly forgets lessons.
- oblio 8y agoDoes it truly forget? A lot of the past knowledge is locked away or it was only experienced by 1000 programmers back in the 70s. It stands to reason that the huge amounts of programmers today have to learn their own lessons. I think maybe in 2050 or so we will reach software development maturity, once the base of experienced developers is not dwarfed by the generation of developers joining the work force in one single year. Keep in mind that the number of programmers is not only increasing moderately in developed countries, but much more so in developing countries, where hundreds of millions of people are joining the global middle class.
- valw 8y agoA lot of past knowledge is also very available and mostly ignored. Even the most popular books about programming are read only by a tiny minority of programmers. Listening to our elders is simply not part of the current programming culture.
- throwme_1980 8y agolol
- usrusr 8y agoThe article talks much about how Kotlin is picked up disproportionally by younger developers. In addition to the obvious Android connection, this might also be because older Java developers are not only more content with Java (self selection: those not locked into Android development would have left Java for good a long before Kotlin came along if they wanted to), but also because many of those open for new languages but still tied to the JVM have already been spoiled and/or burnt by Scala. Spoiled and burnt? I see a lot of potential overlap where one would have learnt enough Scala to perceive Kotlin as a step back, but not enough to permanently leave Java behind. From that perspective, Kotlin looks just like a pragmatic compromise. Immensely useful, perhaps, but not exciting at all.
- switchbak 8y agoI'm a long time Scala guy, and for some reason at the gigs I've been working at Kotlin is far more marketable than Scala. This confuses me, as the style of Scala we've been writing is almost identical to the Kotlin code. At this point I'm chalking it up to 'better tooling', especially in IntelliJ. And underscores. People seem to hate underscores. Well, and the Google-stamp of approval I suppose. Scala definitely does provide way more ways to overcomplicate your code, but with a dose of discipline it's quite manageable. For me, Kotlin does feel like a step back. At the same time the fact that more people are enthusiastically adopting it means I spend less time selling and more time coding - so in that sense I'm actually a reasonably big fan.
- bsaul 8y agoSo Google has golang, which seems to be great for some kinds of server-side development. Then it backs kotlin which is great for android development, and also embraced by large server-side framework such as Spring. Then it has Dart for flutter and cross-platform mobile development. We're now at the point where google has 3 very good programming language, each successful in their initial environment, but are necesseraly going to try to reach out to the other's languages territory. Flutter / Fuchsia is supposed to replace Android, Dart is very interesting for server-side development, and Kotlin aims at "worldwide domination" since it's based on the JVM. That's exciting, but also very confusing if you want to find the good environment to specialize in.
- adrianlmm 8y agoI don't recoment Kotling becuase despite being Open Source it requires a proprietary closed source IDE to use it, they have plugin for Eclipse but it will be always a second class citizen and the free version (IDEA) cannot comapre to Eclipse. To me is just a trojan horse that is heavily marketed by Jetbrains, even for Android apps I'd recoment Dart with Flutter over it.
- vbezhenar 8y agoIdea Community Edition is free and open source. It supports Kotlin with the same plugin. Whether it's comparable to Eclipse is debatable. I like Idea much more.
- adrianlmm 8y agoObjectively, Eclipse is milles ahead and more complete than IDEA, it is a toy compared to Eclipse
- eklavya 8y agoHaving used both I can't imagine what you are talking about. Which features in Eclipse is Idea missing?
- adrianlmm 8y agoFirst of all, I'm talking about the free version of IntelliJ (IDEA), you cannot use it to create Java EE applications and the HTML and JavaScript editors are pretty basic as everything else.
- pjmlp 8y ago- Incremental compilation on save - Not spinning the hard disk all the time indexing libraries - Showing Javadoc by default without extra configuration steps
- pirocks 8y agoAFAIK intellij/idea is open source: https://github.com/JetBrains/intellij-community https://github.com/JetBrains/intellij-community https://github.com/JetBrains/kotlin https://github.com/JetBrains/kotlin
- coldcode 8y agoThere is no one language to rule them all, and there never will be. Compared to when I started in the early 80's there are enormous choices to pick from today. When I started I was allowed to pick any language I wanted as long as it was Fortran. So having new language choices today is a good thing, but it makes it very hard to pick. As an iOS programmer today I am glad to use a nice modern Swift. If I did Android I would likely chose Kotlin. If I did server side I would likely pick Rust or Go or Clojure or Javascript or Erlang or ... too many choices. Its not about the "next generation" its about picking something that works for you and your team/project and hope its not abandoned. No one language is going to be the Next Single Big Thing.
- weitzj 8y agoI enjoy Kotlin, but what is missing is a book: "Kotlin for Beginners". The current state, as I see it, is: Developers learn Kotlin, not Beginners So it is not easy to find good learning material to start as a beginner into programming with Kotlin as your first language. If you have some resources for me that would be nice - so I can convert more people.
- AlexeyBrin 8y agoAvailable in the next few days: https://www.amazon.com/Kotlin-Programming-Nerd-Ranch-Guide/dp/0135161630/ https://www.amazon.com/Kotlin-Programming-Nerd-Ranch-Guide/d...
- tiuPapa 8y agoThe only reason I am focused on learning Golang rather Kotlin is because I couldn't find good docs for beginners that don't assume Java knowledge.
- distances 8y agoTo be honest though, finding programmers with no Java knowledge isn't trivial.
- zan 8y agoHey everyone, I'm Zan - the person being interviewed. Any questions about the survey, let me know :)
- fnordsensei 8y agoPlease excuse the tangent, but is there any programming language that has done away with the file as a basic organizing unit of code? Whenever I consider PL ergonomics (as I do now, in connection with this article), files come to mind as an incidental inheritance of file systems past.
- sls 8y agoI think the Smalltalk systems that use image-based persistence[1] meet that criterion, despite the image itself eventually being persisted in a file system. [1] https://en.wikipedia.org/wiki/Smalltalk#Image-based_persistence https://en.wikipedia.org/wiki/Smalltalk#Image-based_persiste...
- TeMPOraL 8y agoDo you have any alternative to files in mind? There are image-based systems like Smalltalk and some members of the Lisp family, but even in those cases, sources usually end up being stored long-term in files, as a matter of convenience.
- igouy 8y ago> …but even in those cases, sources usually end up being stored long-term in files, as a matter of convenience. Is that "the file as a basic organizing unit of code"? Even when code is organized in applications and classes and versions… and persistence comes from a database, the database will be implemented using a computer file system. https://books.google.com/books?id=ld6E19QIMo4C https://books.google.com/books?id=ld6E19QIMo4C
- igouy 8y agoSmalltalk. “Java has come a ways towards that, but made some fundamental mistakes. I mean, source code in files. How quaint. How 70’s.” "Keynote on Smalltalk: eXtreme Programming to the Max" Smalltalk Solutions '99, Kent Beck. http://home.balcab.ch/jpelrine/download/ss99.pdf http://home.balcab.ch/jpelrine/download/ss99.pdf
- stewbrew 8y ago