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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

The Kotlin Language: 1.0 Beta Is Here

178 点作者 TheAnimus超过 9 年前

15 条评论

kcorbitt超过 9 年前
I&#x27;ve been using Kotlin on Android for about six months, and can&#x27;t recommend it highly enough. If you&#x27;re stuck in the Java ecosystem, Kotlin will make your life much better.<p>I also recommend it for people coming from the world of dynamic typing (Ruby, Javascript, Python, etc.). If you can appreciate the guarantees of a static type system -- and I submit that anyone who has worked on a project of more than a few KLOC can -- give Kotlin a try. It&#x27;s much less verbose than Java, and gives you the tools and constructs to program in much the same style as you would in a dynamic language, but with extremely good compile-time correctness checks. It may not be Haskell, but it&#x27;s pragmatic, practical and productive.<p>The tooling is also world class, as you might expect from a language developed by JetBrains. I recommend using Kotlin with IntelliJ -- the intellisense is guaranteed to boost your productivity.<p>Seamless Java interop has been a huge priority for the developers, so the ecosystem is also quite good. Its biggest weakness (for my use case anyway) is the lack of a good, modern web framework. Hopefully now that Kotlin is more stable a native library ecosystem will emerge that plays to Kotlin&#x27;s strengths more than Java&#x27;s.
评论 #10496419 未加载
评论 #10493796 未加载
eropple超过 9 年前
I&#x27;ve been using Kotlin for a little while, as the backend language for the side project&#x2F;maybe-startup I&#x27;m working on. I went with it because of my troubling tendency to write Scala code I can&#x27;t read three weeks later, and in that I think Kotlin&#x27;s a big success: the Java interop is good (still some weirdness around DI frameworks and non-nullable types, which is unavoidable if you&#x27;re using something like Jersey with HK2), the language itself has <i>most</i> of the niceties I want, and I find that the tooling is really pretty good in general. And the Kotlin community, in my experience, has been really good (aside from...sigh...yet another Slack chat to be in), unlike the continuing and perpetual disaster of Scala whenever certain members of the This Should Be Haskell mafia are allowed near anyone who&#x27;s just asking a question.<p>I miss things from Scala once in a while, but they&#x27;re usually me being way too cute with my code anyway--good for tiny personal things, not for something I&#x27;m hoping I&#x27;m looking at three years from now, not just three weeks from now.
评论 #10495630 未加载
vbezhenar超过 9 年前
I tried Kotlin in one small project, which used Java API and I can recommend it. There are a lot of handy features there.<p>There were quite a bit of breaking changes, but, of course, it&#x27;s expected from unreleased language. It wasn&#x27;t hard to fix things.<p>For me Kotlin is in sweet spot between verbose Java and complex powerful Scala. From a practical point of view, I would prefer it to both. Any competent Java programmer will catch Kotlin fast enough, and it has almost anything I would want from a &quot;improved Java&quot; language.
smithkl42超过 9 年前
Kotlin seems to fill a niche comparable to TypeScript: a language that doesn&#x27;t try to break new ground, but picks a bunch of tried-and-true ideas to fix severe problems in the underlying platform. Like TypeScript, I hope that it ends up being the right language, with the right compromises, at the right time.
评论 #10495183 未加载
nikolay超过 9 年前
How is it better than Ceylon 1.2? Ceylon compiles to JVM bytecode, JavaScript, Dart, and will to LLVM in the future. As a language, it&#x27;s a great superset of Java.<p>I posted [0] about the great new Ceylon 1.2 (which is backed by Red Hat), and nobody seemed to care, but there&#x27;s so much hype about Kotlin - I don&#x27;t get it!<p>[0] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10474126" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10474126</a>
评论 #10495539 未加载
评论 #10494585 未加载
评论 #10494399 未加载
评论 #10495176 未加载
评论 #10495846 未加载
评论 #10494466 未加载
评论 #10495503 未加载
评论 #10494993 未加载
评论 #10494692 未加载
评论 #10495648 未加载
评论 #10496168 未加载
davidcaseria超过 9 年前
Looking at the syntax briefly it seems very similar to Scala. Is there any major differences between Scala and Kotlin?
评论 #10492899 未加载
评论 #10493049 未加载
评论 #10492666 未加载
评论 #10492848 未加载
评论 #10493025 未加载
评论 #10492646 未加载
评论 #10492913 未加载
programminggeek超过 9 年前
I&#x27;ve used both Kotlin and Scala a bit and for some very specific message passing&#x2F;protocol tricks, Scala was able to let me do what I wanted more than Kotlin. That was maybe 6-12 months ago, so I&#x27;m not sure if that has changed.<p>That said, there is something pretty cool about Kotlin that I like. Congrats on 1.0 Beta.
bink-lynch超过 9 年前
I looked around and found a nice writeup on Kotlin:<p><a href="https:&#x2F;&#x2F;medium.com&#x2F;@octskyward&#x2F;why-kotlin-is-my-next-programming-language-c25c001e26e3" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@octskyward&#x2F;why-kotlin-is-my-next-program...</a>
platz超过 9 年前
are non-exhaustive pattern matches in kotlin warnings, errors, or neither?<p>looks like from the docs:<p>&quot;If `when` is used as an expression, the `else` branch is mandatory, unless the compiler can prove that all possible cases are covered with branch conditions.&quot;<p>So it is an error, I assume?
评论 #10493426 未加载
评论 #10494867 未加载
pjmlp超过 9 年前
It would be sweet if it already had a CoreCLR backend.<p>Portable code between WP and Android without JNI pain.
评论 #10493170 未加载
merb超过 9 年前
it would be great if playframework also had kotlin support. The problem here is that kotlin has no sbt support.
评论 #10493997 未加载
TorbjornLunde超过 9 年前
Anybody used it compiled to JavaScript? What’s your experience? How does it compare to TypeScript?
bcbrown超过 9 年前
How easy is it to write Kotlin code for Hadoop mappers and reducers?
Drup超过 9 年前
Comparison with Ceylon ?
评论 #10494181 未加载
EdwardDiego超过 9 年前
I&#x27;m disappointed with the people who are down-voting this comment, as it&#x27;s, in my opinion, informative and provides a reasonable summation of the differences between Kotlin and Scala.<p>I&#x27;d ask people who disagree to put their disagreement into words.
评论 #10497716 未加载
评论 #10495203 未加载