TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The golden age of Kotlin and its uncertain future

48 点作者 philonoist超过 1 年前

17 条评论

dehrmann超过 1 年前
The future is very certain. Mainline Java has been cherry picking the best features from these languages after there&#x27;s sufficient traction and the issues have already surfaced. Since the tooling has to support both Java and some other contender, Java always gets first-class support. Using any of the alternative JVM languages (except maybe Clojure) gives you better syntax, somewhat better abstractions for a few years, and worse tooling. And syntax is overrated. Java might be verbose, but it&#x27;s well-understood, and it&#x27;s not <i>actually</i> what slows development.
评论 #38948967 未加载
评论 #38949124 未加载
评论 #38949047 未加载
评论 #38949197 未加载
评论 #38948893 未加载
评论 #38948958 未加载
评论 #38949151 未加载
评论 #38949192 未加载
wiseowise超过 1 年前
What a low quality article. Language is more just a set of features. Anyone who tried both Java and Kotlin for reasonable amount of time will understand that. Regardless of how many features Java adopts from Kotlin or other modern language it will still remain shackled by billions of lines of legacy code and boilerplate consequently.<p>The only one who might like the article is self-conscious Java developer who wants to feel good by bashing on competing language.<p>Wish it wasn’t morning so I could elaborate on every point. Might reply later to this comment.
cryptos超过 1 年前
&gt; Null was always a pitfall in Java. It has slightly improved with the controversial Optional type. It’s also why I suggest that everyone use only wrapper types everywhere, instead of primitives, unless they can prove with a JMH test that a primitive provides enough of a performance benefit.<p>That doesn&#x27;t make sense at all! Why should one do it without a need? To have NullPointerException with &quot;primitive&quot; types, too?<p>&gt; Kotlin ecosystem is severely lacking compared to Java. FAANG has first-class support and commitments to Java, like providing JDK with multi-year support commitments.<p>It is not really needed to provide JDKs or something else especially for Kotlin, because Kotlin basically just uses the JVM (at least if you use the JVM as a target).<p>&gt; To this day, there are significantly fewer Kotlin developers than Java developers.<p>Yes, that is probably true. Although almost every Android developer should know Kotlin these days and there are quite a few them. But even if a developer doesn&#x27;t know Kotlin at all, it is relatively easy for a Java developer to learn it. In my experience it a takes a few days to a few weeks to be at least as productive as with Java (even not all Kotlin features are learnt in this time).<p>&gt; Lack of progress: Compared to Java lately (e.g., records two years ago, pattern matching, and VT release this year), Kotlin has been stagnating in delivering the big features that would bring us (Infobip) value over alternatives.<p>Here, I agree. Some years ago I was super excited about Kotlin and couldn&#x27;t wait for a new release. These days new releases are mostly boring. Maybe the most important stuff is simply done, but then there are enough interesting ideas to improve it (real pattern matching, meta programming, union types, ...). But JetBrains and Google decided that it is more important to improve the fundamental infrastructure first and decided to create a new, faster compiler (K2). As boring at it is feature-wise, I think it is a wise decision, because every project would benefit from it. The plan is to add new features, once the compiler is ready.
kmonsen超过 1 年前
Maybe in the backend but for mobile (android) kotlin is still a thing and will be for a long time.
dave4420超过 1 年前
Scala isn’t dead. I’m job hunting right now, and seeing plenty of Scala jobs. Not as many as Node+TS+React, but what do you expect?
评论 #38948956 未加载
评论 #38949502 未加载
评论 #38962508 未加载
评论 #38949601 未加载
stefs超过 1 年前
in my opinion, modern java&#x27;s language ergonimics are good but kotlin is still far better. i didn&#x27;t write much plain java in long time since having to adopt kotlin.<p>i love the integrated null safety &#x2F; handling at a syntax level with the ? operator; optional felt clunky in comparison. lambdas plus everthing&#x27;s an expression allows for concise, readable code. and i love the scope functions. i agree that extension methods may have turned out to be a footgun, but i feel like it hasn&#x27;t been a huge issue in the field. it&#x27;s doubtful java is able to integrate most of those ideas in a way that feels as natural.<p>i don&#x27;t understand why the author chose to ignore android, it&#x27;s an elephant in this room. as long as android doesn&#x27;t drop kotlin for something else as the lingua franca of the platform it&#x27;s got certain guarantees.
评论 #38950081 未加载
cetu86超过 1 年前
While the author dislikes extension functions in kotlin they enable one feature that Java doesn&#x27;t have: With them you can create domain specific languages within kotlin that are quite ergonomic.<p>- Jetbrains has built a nice reactive js wrapper with them. - The gradle configuration is written in a kotlin dsl.<p>They can be used to specify configuration and add meta information and thus replace Java annotations.<p>That is my kotlin &quot;killer&quot; feature because I personally don&#x27;t like annotations.<p>Java&#x27;s language design has always been &quot;pedagogical&quot; (or patronizing) to not give the developer to much power to create to much abstractions and complexity. So it&#x27;s not just its age but also this philosophy that has made Java a rather inelegant language ( compared with e.g. kotlin)
FlyingSnake超过 1 年前
There are two problems Kotlin faces; Kotlin the project&#x2F;product and Kotlin the language. While this article touches Kotlin as a Product, it’s very thin on the Language aspect.<p>Here’s an old post discussing the real troubles Kotlin Lang might face due to the inevitable divergence of Java&#x2F;JVM.<p><a href="https:&#x2F;&#x2F;np.reddit.com&#x2F;r&#x2F;java&#x2F;comments&#x2F;ndwz92&#x2F;can_i_get_some_reasons_to_use_java_instead_of&#x2F;gyd5yi5&#x2F;" rel="nofollow">https:&#x2F;&#x2F;np.reddit.com&#x2F;r&#x2F;java&#x2F;comments&#x2F;ndwz92&#x2F;can_i_get_some_...</a>
评论 #38949016 未加载
mustermannBB超过 1 年前
My only issue with Kotlin is Kotlin&#x27;s over reliance on JetBrain products and being so tightly tied to a company which priority it is to of course sell their IDE. To be fair, one of course use the free community edition but still you kinda need a JetBrain product to ensure you getting the most out the language. With language servers these days, that feels like it is going the opposite direction.
dingi超过 1 年前
As I see, the only purpose of Kotlin is a be test bed for novel features to JVM based languages. And eventually Java is going to integrate those features better than Kotlin. And Kotlin&#x27;s advantages are gone like that. To be honest, I have never seen Kotlin used in environments other than Android. The day Google decides to move Android development to another language will be the day Kotlin dies. Or becomes a zombie.
评论 #38949622 未加载
评论 #38949673 未加载
ShadowBanThis01超过 1 年前
Does the &quot;pattern matching&quot; referred to here work like JavaScript&#x27;s &quot;destructuring?&quot; It&#x27;s the thing where you can call a function with an object, but the function&#x27;s parameters extract one or more of the object&#x27;s members directly without mentioning the object&#x27;s class, so it&#x27;ll take anything that has appropriately named members.
评论 #38949349 未加载
评论 #38949688 未加载
phendrenad2超过 1 年前
To me, Kotlin is so similar to Java that it might just survive in the way that Elixir and Erlang coexist.
评论 #38949437 未加载
bobm_kite9超过 1 年前
I&#x27;d love to see Java adopt Kotlin&#x27;s more advanced type system: Proper support of nullable&#x2F;non-nullable types, better generics and no primitives.<p>Not sure how they could get there but that would be amazing.<p>Also Kotlin has a pretty good JavaScript and Native support story now.
nbittich超过 1 年前
I agree, I remember learning Ceylon few years ago in the metro while going at work, now it is probably one of the rarest programming language that we can say for sure it&#x27;s dead (has been archived few years ago iirc).
ShadowBanThis01超过 1 年前
&quot;FAANG has first-class support and commitments to Java&quot;<p>Nobody told Apple that.
评论 #38949094 未加载
r1jsheth超过 1 年前
one thing i definitely liked about kotlin was reduced verbosity. otherwise all the other points, you made me ponder a bit. let&#x27;s see where kotlin goes.
jillesvangurp超过 1 年前
The future is always a bit uncertain. But Kotlin&#x27;s future actually looks pretty good to me. This article looks like the author is not really clued in to the massive amount of progress and change happening especially in the last year. There&#x27;s nothing wrong with being a bit old an conservative and stuck in your Java ways. Been there done that and trying to be better than that now. But this article is just a bit overly dismissive and poorly argued.<p>I&#x27;m biased of course having used Kotlin extensively for the last six years and having made the switch from Java. From my perspective It&#x27;s simply a much better Java. And I have 25 years experience with that, mostly server side.<p>And the way I&#x27;m using it, it&#x27;s also a better Typescript for me. If you have trouble parsing that last bit, I&#x27;m using kotlin-js to develop frontend code. It&#x27;s actually really nice for that even though not many people do this. Well worth a look if you are getting tired of dealing with Javascript&#x27;s idiosyncrasies (which typescript inherits) and a bit jealous of what all the cool kids doing mobile applications are using. Which would be using fancy Kotlin and Swift UI frameworks mainly.<p>Kotlin-js being nice to use should not be that surprising because of course a lot of Android developers use and love it and a lot of the libraries and practices port over very well to the web if you use kotlin-js. E.g. I use dependency injection (koin); which as it turns out is equally useful and nice to have in a browser as it is on Android and in Spring or other places.<p>There are a few changes happening this year with Kotlin that are exciting for Kotlin users and interesting for people not yet using it:<p>- Kotlin native is stabilizing. It now works well on IOs, Android, Linux, Windows, and MacOS. It&#x27;s not &quot;just another jvm language&quot; anymore. The multiplatform library ecosystem is really starting to thrive. Lots of growth there. Especially in the last year. And I maintain a few myself.<p>- The web assembly compiler is now available in an alpha version and browser support for garbage collection in WASM just rolled out in Firefox and Chrome a few months ago. This is required by Kotlin&#x27;s wasm support as it does not bundle its own garbage collector. Safari should follow soon&#x2F;eventually. This means you can now use kotlin-wasm in a browser without having to fiddle with feature flags in your browser. Multiplatform library support for this is still a bit a work in progress but most kotlin multi platform libraries should start having wasm targets in the next few months. Wasm works in servers and on servers, lambda functions, and edge networking. So, first class Kotlin support for wasm is a big deal and the whole kotlin multi platform library ecosystem is coming along.<p>- Kotlin 2.0 is in Beta currently and should release in a few months (spring?). Kotlin native and wasm support and that are all happening at the same time and come on the tail end of a years long effort to re-engineer the compiler and IDE toolchain. Work on Kotlin 2.0 actually started about three or so years ago and it has included a gradual rewrite of the compiler through the 1.6-1.9 releases.<p>- Building on all this is Compose multiplatform, which brings Google&#x27;s Jetpack Compose to other platforms. That&#x27;s currently stable for a few platforms, in alpha versions on others (like IOS and web). That&#x27;s something that should stabilize towards the end of the year. We&#x27;ll have a cross platform, natively compiling UI framework that is usable across web (wasm), IOS (native), Android (native) and the three Desktop platforms (jvm, for now). So, that could end up being a nice alternative to things like flutter and react-native. Or indeed to packaging up web applications as PWAs or using things like electron.<p>It might not be everybody&#x27;s cup of tea but that&#x27;s a lot of progress that came together in the last year. I use other languages besides Kotlin. So, I can appreciate other languages as well. But Kotlin is just really nice.