19 ms·
Kotlin becomes second most popular language on the JVM
- thowfaraway 7y agoSolid tooling can really boost a language. Clojure advocates should internalize that.
- pjmlp 7y agoWhat boosts a language is having a tool vendor alongside an OS vendor shipping it. It would be a bit hard for Clojure to achieve that level of support.
- thowfaraway 7y agoOf course you are right, but it all started with the tight integration with Jetbrains editing package.
- pjmlp 7y agoKotlin and InteliJ are from JetBrains, no wonder. They are trying to be the next Borland with Kotlin as their Turbo Pascal (#KotlinEverywhere), and got Google Android's team as the language godfather.
- WillPostForFood 7y agoRails and Textmate had a similar synergy without the direct connection Kotlin and IntelliJ have. There is something to the language/editor relationship that can kickstart the ecosystem.
- bitL 7y agoGoogle tried to acquire JetBrains multiple times in the past but owners didn't want to sell their cash cow; this is their way to have a large influence over them by paying them a lot for Android Studio, making JB CEO happy and supportive. AFAIK JB teams often work at Google offices and vice versa and it looks like a slow mental assimilation process in progress. That doesn't mean they won't change their minds in the future.
- thu2111 7y agoWhere did you hear that? Because what I heard is that Google pay JetBrains nothing. They forked IntelliJ Community Edition to make Android Studio and have their own development team, which honestly sounds much more like Google to me.
- bitL 7y agoI talked to some higher ups.
- Scarbutt 7y agoI wonder how they feel now about no taking that Google money. VScode is crippling Jetbrains at a fast pace.
- CuriouslyC 7y agoVSCode is winning Javascript developer mindshare, but for most other languages Intellij is still dominant. For example, PyCharm is free and far better than VSCode for Python development. Additionally, Jetbrains products are free to use for people in education, which has pulled a lot of users.
- pjmlp 7y agoJetBrains won't be able to stay doing free beer forever though, hence why one then only gets proper support for Kotlin/Native on CLion.
- bitL 7y agoJetBrains lost it when they forced developers into subscriptions and later slightly backtracked (i.e. you can use 1 year old version after subscription expires), but still offered a worse deal than they had before. That came with a new CEO and CFO who insisted on "subscriptions are the future" model. VSCode just filled the void they left wide open. But I suspect Sublime and Atom are the main victims of VSCode.
- jvican 7y agoScala isn’t owned by a company making tools, but in the recent years it has experienced a big transformation on the tooling space with projects such as mill, Ammonite, Metals, Scalafix or Bloop. I’m obviously biased because I’ve worked on some of these tools but having worked with other programming languages lately I’d dare to say Scala tooling is solid and good. In some regards, we have better developer workflows than Kotlin and Java developers have and there’s a huge stream of innovation in this space.
- pjmlp 7y agoIt has one of the best Swiss universities, and Twitter, sponsoring its development thought. Most of GraalVM improvements regarding Scala have been thanks to Twitter.
- iainmerrick 7y agoAnd that’s a good thing, right? I mean, I always hear Turbo Pascal was terrific.
- pjmlp 7y agoYes it was, then Borland decided it wanted to play in the big league and rest is history.
- Barrin92 7y agoemacs and cider are rock-solid tools for Clojure, as are equivalent plugins for other lisps. It's not a very beginner-friendly tool, but I'm pretty convinced it really is the best environment for lisp development there is. I'm not saying that having more mainstream tooling wouldn't be good, but people should not be discouraged from Clojure or Lisp development because of an apparent lack of tooling.
- thowfaraway 7y agoTelling someone new to a language to start with emacs & cider is a disaster. They are rock solid amazing tools for 2% of programmers. I like emacs, but it is harder to learn than Clojure, and trying to teach someone both at the same time is tough. Plus there is no real community unity in editor choice, so you have the community split over emacs, Cursive, VS Code/Calva, Atom. Plus a bunch of dead ends like Light Table or Nightcode.
- puredanger 7y agoYou say that like having 4 or 5 solid editors for Clojure is bad because no unity. To me, it seems great because there are a wealth of choices for people that like different things and many of them are excellent, well above the bar for being a productive developer.
- thowfaraway 7y agoIt is probably net positive for advanced users who have niche needs that the different editors address, but I'm saying it is bad for beginners/learners. More specifically, I'm saying emacs/cider is bad for beginners/learners, and the more traditional IDE options aren't so solid.
- waffletower 7y agoI use Cider every day professionally. It is so far from being a rock in any way. Embarassingly inconsistent release to release. Every major release has a new major bug. The REPL lag in Cider 23/Emacs 26 is stupefying. The more text in the buffer, and it doesn't take much, the lag increases exponentially. Google the issue and you will see the angry defendents blame you and your packages. Profile! Profile! Profile! I didn't change anything, Emacs 26 and Cider changed for the worse.
- Scarbutt 7y agoClojure is simpler, defaulting to immutable data structures literals and a good REPL is superior to most of that tooling IMO.
- thowfaraway 7y agoThose are great features of a great language to program with, but when you are talking about adoption, you want good, easy tooling to expose the good stuff. When the first two chapter of the oft recommended Clojure for the Brave and True are just about setup and and long Emacs tutorial, you are putting up a barrier to using the language.
- Scarbutt 7y agoAgree, wouldn't recommend Clojure to beginners. As it stands today, it is a tool for experienced programmers mostly.
- deleted 7y ago[deleted]
- iLemming 7y agoThat is so untrue. I personally have seen people learning Clojure. Absolute beginners with no programming experience and mature, seasoned pros. It is much simpler even than Python and Javascript and a lot more simpler than Java or C++.
- iLemming 7y ago"Clojure for the Brave and True" is just one of the many (matter of fact I just checked on Amazon - there are over 50 books on Clojure, I stopped counting at 50, I don't know how many more out there) And that's probably the only book that recommends setting up Emacs. It was published in 2015. Back then maybe the argument about tooling made sense, but honestly, have you looked around lately? Every major editor today can be set up for Clojure programming.
- iLemming 7y agoClojure today has pretty good support in ALL major editors (not just Emacs) - Cursive for IntelliJ - is amazing, Chlorine for Atom - is cool, Calva for VSCode is improving every day, Vim-fireplace is a battle-tested tool used by many, there's even a way to set Sublime to work with Clojure. Even most popular (and oldest) languages can't brag about being equally supported in all major editors, and Clojure can.
- waffletower 7y agoI am a professional Clojurist. I have used Emacs for decades but honestly and succinctly -- it sucks. Especially Emacs 26. Cider breaks in new random ways every major release. Clojure tooling is its (only) weakness.
- dlbucci 7y agoHaving recently started writing a bunch of Kotlin to replace Java, I'm happy to hear this! Type inferencing, data classes, and non-nullability make it so easy to use and have helped me catch bugs, too! I don't enjoy it as much as TypeScript yet, but it's a close second :)
- jakear 7y agoFirst is Java, 87%. Does anyone here know how JVM ecosystem is governed? Do the needs of Java dominate or can smaller languages get change requests in reasonably easily too?
- lmm 7y agoThere's a committee and a process. As an outsider it seems like non-Java languages get at least some influence, e.g. invokedynamic was put into the bytecode largely to support non-Java.
- dehrmann 7y agoMost of the new development in Java is syntactic sugar, not JVM-level. The most interesting JVM thing recently has been invokedynamic, which was a boon for JRuby, but ended up helping Java's own lambdas.
- kasperni 7y ago> Most of the new development in Java is syntactic sugar, not JVM-level. That's not true. The javac team is what 5% of all people working on OpenJDK.
- dehrmann 7y agoAre they adding instructions to the language or working optimizing the JVM, though? My point was that someone writing the language targeting the JVM will compile to Java bytecode, so missing/suboptimal instructions are where they're mostly likely to feel pain.
- pjmlp 7y agoJava needs drive the JVM, yes they do take into consideration what might be relevant for guest languages on the JVM, but that is "nice to have" kind of thought. You can easy check this by reading JEP proposals, discussions on the mailing list, or talks from JVM Language Summit.
- dtech 7y ago
- dehrmann 7y agoI haven't used Kotlin, but when I read through some examples and guides, it felt like Java with all the messy legacy cleaned up, but it was still familiar.
- pjmlp 7y agoNo wonder, having an whole OS as godfather, with on maintenance Java language support. However don't party too much, all of them counted together are still a minority versus Java on JVM, as clearly shown.
- insulanian 7y agoI was surprised to see that Clojure scored better than Scala. Is Scala loosing its appeal? Did Dotty scare people away, because it smells like Python 2 vs 3?
- dehrmann 7y agoMy feeling is that between sbt being painfully slow and Java 8 getting lambdas, people lost interest in Scala.
- slimed 7y agoDing
- Fellshard 7y agoThat, and it's one-way interop - calling Scala from Java is a deathly proposition.
- zmmmmm 7y agoFor me this is the bigger problem. With Groovy and to a lesser extent Kotlin I can write code and ship a library and the consumers don't even know it's source is Kotlin. But it's much harder with Scala. Especially with Groovy you are really not leaving the Java ecosystem at all.
- ofrzeta 7y agoMaybe. I just wanted to point out that there's Mill as a build tool for Scala: https://github.com/lihaoyi/mill https://github.com/lihaoyi/mill (by the Scala.js maintainer Li Haoyi)
- saityi 7y agoThe last time I gave Mill a shot, I couldn't find a way to authenticate into private artifactory repositories, which made it kind of a nonstarter. Do you know if this has since been added?
- 7y ago
- _pmf_ 7y agoWell deserved. No academic high browing, no armchair hammocking, just accessible pragmatism.
- pjmlp 7y agoIndeed, arrow and flow.
- dehrmann 7y agoIt feels like Java meets Python.
- 6gvONxR4sf7o 7y agoWhat does armchair hammocking mean? I've never heard the phrase before.
- deleted 7y ago[deleted]
- _pmf_ 7y agoI'm referring to the very entertaining, but a bit truism-heavy and patronizing presentations of Clojure's Rich Hickey, for example "Hammock driven development": https://www.youtube.com/watch?v=f84n5oFoZBc https://www.youtube.com/watch?v=f84n5oFoZBc I like Rich Hickey's philosophy and personal style, but Clojure just falls short in every aspect as an implementation thereof, in my opinion. For example, it switched from heavily promoting STM as a concurrency primitive to "app state in atom" to new async/channels.
- capableweb 7y agoI don't think you can call clojure.async as something that was made for switching anything, replacing it. Both ways exist and are being promoted for their use cases. I think Clojure is one of the few languages where things have been very stable for a good while. Maybe it's being developed slower than other languages, but using Clojure is nice because of the trust you have of it remaining the same. Everything else is basically libraries on top of the language itself.
- dcolkitt 7y agoLet me ask a question as someone with pretty minimal Java experience. If someone was starting a greenfield JVM project today, is there really any compelling reason not to choose Kotlin over Java? Because the impression I get is that Kotlin is a strict improvement along every dimension. But as an outsider, I'm not sure if I"m just being blinded by hype.
- abraxas 7y agoThere are far more resources out there for learning Java, better tooling support beyond IntteliJ and many of the cool features of Kotlin are slowly making their way to Java.
- hv42 7y agoWhile some of the features in Kotlin are slowly coming to Java, that also means that one has to update Java (while you can use all the new kotlin while still targeting Java 8). Some features like named parameters or null checking might probably never make it to Java. There is a nice talk about this that compares Kotlin to what will be in Java 19: https://youtu.be/te3OU9fxC8U https://youtu.be/te3OU9fxC8U
- vbezhenar 7y agoIf you want null-checking, you can use Nullable annotations. While they're not as good as proper type system, they mostly do the job.
- wtetzner 7y agoBut you have to remember to use them in all the right places. Yes, they help, but it's not just about how good they are, it's about people actually using them too. If you're working on a team, you need to worry about whether or not everyone else is correctly using the annotations.
- pjmlp 7y agoIt also means that Kotlin doesn't get all Java goodies, like virtual threads, value types or GPGPU support.
- _Codemonkeyism 7y agoWe build and scaled a startup based on Scala code and successfully sold it, so - with all the Scala problems [0] in mind - Scala will always have a place in my heart. Using IntelliJ since a decade+ I wish those guys the very best with Kotlin. [0] Binary incompatibilities, very very slow compilation speed, atrocious build tool
- gibolt 7y agoI started using Kotlin daily about 8 months ago. Recently had to go back to an older Android codebase, and immediately decided I had to start converting. The amount of boilerplate is unbelievable. I'm able to cut the number of lines by half while increasing readability. Type/null safety is a huge added bonus P.S. Kotlin extensions are the best
- yetihehe 7y agoNeeded some POC code on android last week, that was my first use of kotlin and my most memorable encounter: kotlin-stdlib / kotlin.experimental / and . So kotlin has bitwise "and" operator for bytes, but it's still experimental? > I'm able to cut the number of lines by half while increasing readability. What I've seen from kotlin code on the web is that sometimes code is so terse that it's too hard to understand, but it's probably because of not being accustomed to kotlin yet (I've written so convoluted erlang list comprehensions that I'm still ashamed, but those can squeeze 10 lines of java into one erlang line).
- gibolt 7y agoLike with any language, out can make it short to the point f obfuscation. The goal (and the opportunity) is to make your code very declarative. view.removeSelf() vs. ViewGroup parent = (ViewGroup) view.getParent(); parent.removeChild(view); Extension Properties and data classes further help centralize the contents of a class.
- vbezhenar 7y agoLooks like a band-aid for bad API.
- joe_fishfish 7y agoWelcome to Android.
- wtetzner 7y agoOf course. And if you are using any sort of 3rd party library, there's a good chance it has some bad design decisions in it. Having extension methods allows you to clean them up. If the library is open source, you can of course try to contribute changes, but they may or may not be accepted, and maybe the library is in such wide use that they don't want to break backward compatibility.
- emmanueloga_ 7y agoProps to https://ceylon-lang.org/ https://ceylon-lang.org/ for a good effort. It doesn't seem to be on the race anymore, but at the time it looked like a super interesting contender.
- imtringued 7y agoIt was a good example of how to build a language in 4 years but the JVM language space is already filled to the brim. The only way to stand out is by having a large vendor bless it (Kotlin on Android).
- thu2111 7y agoI'm not sure that's the whole story. Kotlin was blessed on Android because it was growing like a weed, developers didn't need Google's permission to use it and weren't asking for it. The Android team went with the flow (smartly). I evaluated Ceylon vs Kotlin in 2015, back when Kotlin wasn't even close to a 1.0 release and neither had any adoption. They're very similar in a lot of ways and so the choice came down to a lot of small things added up rather than any one big thing. I chose Kotlin for a lot of reasons, but a few (in no particular order) were: 1. It had a more convenient syntax. The Ceylon designer felt that autocomplete meant verbose syntax didn't matter but it does. "variable Integer foo = 10" isn't just a typing issue but also a reading issue. "var foo = 10" is better. 2. Ceylon deviated more from the JVM ecosystem than Kotlin, in particular, it invented its own collections like Scala, but which didn't appear to be much different to regular Java collections. This means idiomatic Ceylon would obviously be a Ceylon library to users and not a Java library. Kotlin uses standard Java collections but enhanced via extension methods. It also provides a bunch of knobs to make the output classes seem like idiomatic Java classes in the few places that doesn't happen automatically, so you can reasonably use it for libraries. This makes a huge difference to Java interop. Kotlin is really the only JVM language that takes Java interop seriously: the rest all treat it as a price of admission to use the JVM at all and minimise their effort on it. 3. Ceylon was mostly tooled for Eclipse which, in my view, is an inferior IDE to IntelliJ. The tooling was itself not as good as even the pre-1.0 Kotlin plugin. 4. Ceylon had invested heavily in a complicated module and type system, which was the primary set of things they emphasised. These sorts of features have a relatively poor track record of delivering value; slightly-stronger-than-Java seems to be about the sweet spot at the moment. Much stronger than that and you end up in Haskell. Kotlin went in for more type inference and more usable generics (convenience), Ceylon 5. Ceylon seemed much riskier to me (correctly). Nothing used it. It was clearly the project of one guy at Red Hat who'd had a previous successful project (Hibernate), but Red Hat weren't talking about it or using it in any way. On the other hand JetBrains had a large team assigned to Kotlin and were explicit that they were creating it to use in IntelliJ itself. The existence of a Java to Kotlin converter tool showed that they were completely serious about this, as J2K was a lot of work to build and would only be useful in a truly serious assault on existing Java codebases. Ceylon seemed far more interested in fancy type systems than the practical details of adoption. 6. Ceylon had some weird gotchas and interop glitches that weren't normal for Java-like languages, like a sensitivity to the case of the first letter of identifiers (I know Go does this too) and difficulty handling Java arrays. There are named constructors (cool) which don't compile to static methods as is idiomatic for Java but some weird Ceylon specific notation (boo). This sort of thing showed it wasn't trying to be "just a better Java" which is what I was in the market for.
- hyperpallium 7y agoYet still can't compile kotlin on android.
- sgt 7y agoWhat would be the use case of compiling Kotlin on Android?
- hyperpallium 7y agoDeveloping on a phone or tablet.
- sgt 7y agoBut I mean... that must be a terrible developer experience. Why even bother?
- nulld3v 7y agoKotlin compiles just fine inside Termux Arch.
- LessDmesg 7y agoKotlin is Java done right. It's what Java would have been from the start, if only original Java designers weren't C++ copycats in a rush.
- iainmerrick 7y agoEvery single popular language was rushed, and every single one borrowed many ideas from elsewhere.
- LessDmesg 7y agoYes, so it's great to see at least some of them get to the 1.0 version eventually (and I mean Kotlin = Java 1.0). Now if only we could get people off the pre-release versions of Java (which for some reason are named "Java 11", "Java 12" instead of "Java 0.9.1", "Java 0.9.2" as they should) and on to the real deal! Seriously, I have great hopes for Kotlin. It corrects some Java's most egregious sophomore mistakes, it doesn't try (and fail) to be Haskell like Scala did, it's accessible AND has a major company behind it. Kotlin is surely something I wish I could use at work.
- jvican 7y agoWhat is the methodology behind these results? If it is what I read in the introduction, judging Kotlin to be more widely used than Scala based on a poll is deceiving and IMO loses any weight this report might carry.
- jjtheblunt 7y agogenuine question: why Kotlin when Scala already exist[s,ed] ?
- sproketboy 7y agoNot too surprising. It's popular for android development.
- turk73 7y agoFormer Groovy dev here. I read pretty much all the comments here and the thing I am struck by is that we had pretty much everything Kotlin has in like 2011 with Groovy, it's just that for some reason a lot of assholes either didn't like the name or "muh strong typing" was a big deal, iirc. Anyhow, my current team wants to move to Kotlin for Spring Boot 2 microservice work. I'm not against it per se, and I spent a lot of time learning the language and all its cool features. The issue I have isn't the language but rather that: 1) I would have to split my time between Kotlin and Java and I would like it to be one or the other. I already did that with Groovy and my Java suffered for it, and so did I. It's like losing your magic Jedi abilities to go back to Java. 2) I have developers who can't successfully write good Java, and looking at Kotlin, it is far more sophisticated and easy to blow one's foot off with. No thanks. I have enough code reviews. Several people I work with can't do Java streams correctly. 3) Recruitment for Kotlin devs is impossible. You have to train people and companies won't do that, so there's no pool of talent ready to go. 4) Future job changes--see #1. I spent a ton of time doing Groovy (okay, and Clojure) only to have those rugs completely pulled out from under me later on. I'm flexible so whatever, but like I said, it was like losing my Jedi powers.
- gazarullz 7y agoI wonder how long is it gonna be until Kotlin will have the same fate as Groovy and Scala. Don't get me wrong, I appreciate both Groovy, Scala as well as Kotlin. History has shown that Java has always managed to move forward and superseed the former.
- _bxg1 7y agoSeems like Kotlin is basically "Java: The Do-over", right? Unlike Clojure and Scala, it aims for the same use-cases, a similar multi-paradigm balance, etc to Java, just with an extra 15 years of language design hindsight.
- runT1ME 7y agoI do think Kotlin is a 'better java' while Scala fails to satisfy that niche. However, I wonder if we'll actually see some big Open Source projects/platforms released that are written in Kotlin. For Scala you have Kafka, Spark and Flink which are widely deployed in the enterprise. Will Kotlin have a marquee infrastructure project to tout soon?
- bozoUser 7y agoMy first impression is that Kotlin is being mostly being used by the android community. Is anyone using Kotlin to write services, what are your experiences with that ?
- fulafel 7y agoturk73's comment (https://news.ycombinator.com/item?id=22258252 https://news.ycombinator.com/item?id=22258252) can't be replied to for some reason so replying at top level: I agree that switching between languages can kind of drain you of a good touch to your working language. I think this is a real downside about all the other langugaes that a dev today has to deal with too (Ansible, bash, CloudFormation, CSS, etc. I like Clojure because you can use the same good language on the frontend and backend. > 3) Recruitment for Kotlin devs is impossible. You have to train people and companies won't do that, so there's no pool of talent ready to go. Is this really a common problem in the corporate world? In my experience people are to quick to pick up at least dynamic languages. I guess it's possible that Clojure is easier in this respect, or maybe Clojure jobs just attract people with a more exploratory attitude.