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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

What's New in Kotlin 2.0.0

124 点作者 farmerbb大约 1 年前

7 条评论

binkHN大约 1 年前
Perhaps the most important piece of this:<p>&gt; ...the new Kotlin K2 compiler is used by default and it is Stable for all target platforms: JVM, Native, Wasm, and JS. The new compiler brings major performance improvements, speeds up new language feature development, unifies all platforms that Kotlin supports, and provides a better architecture for multiplatform projects.
smallerfish大约 1 年前
I&#x27;m a big fan of Kotlin, but the developer experience in the IDE has been pretty rocky recently, various of their secondary libraries are semi-abandoned, and their ecosystem documentation is a mixed bag at best. My ideal for the next 12 months would be for them to focus solely on quality. There&#x27;s incredible potential, but they&#x27;re going to shoot themselves in the foot if they don&#x27;t get on top of this soon.
评论 #40434166 未加载
MobileVet大约 1 年前
Kotlin is great, but we are having a hard time finding solid devs due to the smaller ecosystem for it.<p>If anyone is looking or just wants to find a place that truly cares about its customers and team, please give me a shot out. We pay very competitively, share company profits and give everyone 3 weeks off over winter. You wont have a 1&#x2F;10000 chance of your options going to the moon, but you will love the team, the mission and you will never get called after 5.<p><a href="https:&#x2F;&#x2F;www.pocketprep.com&#x2F;jobs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.pocketprep.com&#x2F;jobs&#x2F;</a>
评论 #40440216 未加载
评论 #40439020 未加载
评论 #40451781 未加载
评论 #40437355 未加载
fifteen1506大约 1 年前
I noticed [JetBrains] appears to have an UI framework which works on all 3 desktop OS and 2 mobile OS.<p>Does anyone have hands-on experience?
评论 #40434196 未加载
评论 #40434128 未加载
评论 #40438842 未加载
aixpert大约 1 年前
funny that they mentioned Gradle as the first feature change when the only thing we requested was the compiler to run without this gradle mess
评论 #40441200 未加载
jillesvangurp大约 1 年前
I&#x27;ve been an early adopter of Kotlin 2.0. We use kotlin for our backend (vanilla spring boot setup) and our frontend via kotlin-js. We also have a multi platform library for out backend API client. This powers both our server integration tests and our frontend. If you are wondering why we did that, it&#x27;s mostly accidental. I had a kotlin&#x2F;android developer and no time to retrain him on react&#x2F;javascript. So we picked a Kotlin-js web framework and discovered that it worked well enough for us. It&#x27;s called Fritz2 and relatively obscure. But definitely worth looking at.<p>This setup has worked fairly well but it was a rough ride of the typical early adopter bugs, compiler issues, etc. over the years. Consequently when Kotlin 2.0 came out of alpha and entered beta last year, we tried it out and immediately liked it for one big reason: massively improved compiler performance.<p>Especially with kotlin-js the difference was big enough that we were reluctant to revert back to 1.9. We are talking from edit -&gt; compile -&gt; webpack (by far the slowest thing now) round trips going from &gt; 30 seconds to &lt; 10-15 seconds. About half of that is webpack. I still wouldn&#x27;t call it fast but it&#x27;s definitely better.<p>The early betas we had some code that didn&#x27;t compile and we found some workarounds and on a few occasions engaged with the developers via the Kotlin slack on specific bugs. They are awesome and very responsive. By beta 2, we had everything working that we cared about. We didn&#x27;t look back after that. I wouldn&#x27;t recommend being an early adopter for bigger companies; but for us it was fine. Worst case would have been having to roll back to something that worked and then waiting for a fix.<p>Highlights of this release are pretty simple:<p>- no new language changes relative to 1.9. This is on purpose because the whole point of this release is the compiler. So, this should be an easy one to update to. Everything should just work. If it doesn&#x27;t file a bug or fix your code because it probably does soms sub-optimal things.<p>- New compiler backend and frontend that have come together over the last few several major releases. This clears the path for a lot of stuff. Including better IDE integration, language changes, and less headaches supporting different compiler targets.<p>- wasm support is coming together (in alpha release currently). The main limitation is not the compiler but the lack of multi platform libraries that support it. This is slowly being addressed. I&#x27;m currently waiting for ktor-client to get support. Wasm has two targets: wasmWasi and wasmJs. wasmWasi is problematic with library support right now but should catch up in the next months.<p>- Some improvements in the kts gradle dsl for the multi-platform plugin. Nice but not world shocking.
评论 #40434275 未加载
newZWhoDis大约 1 年前
Does the compiler catch calls to throwing functions from non-throwing functions yet?<p>That’s been a huge problem for us: Some lib&#x2F;func 16 layers deep throws an exception and it’s wrapped in a non-throwing function so the higher-level caller has no idea the call can generate an exception and runtime crash the whole app.
评论 #40438848 未加载