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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Kotlin for JavaScript

173 点作者 surrTurr大约 3 年前

14 条评论

esprehn大约 3 年前
I&#x27;d be more interested if there was VSCode support. The JetBrains folks response was ridiculous and dismissive: <a href="https:&#x2F;&#x2F;discuss.kotlinlang.org&#x2F;t&#x2F;official-support-for-visual-studio-code&#x2F;8242" rel="nofollow">https:&#x2F;&#x2F;discuss.kotlinlang.org&#x2F;t&#x2F;official-support-for-visual...</a><p>Apparently they refuse to support the most popular web IDE because Kotlin for JS is really about selling IDEA licenses. Fair enough, but it means I don&#x27;t suggest Kotlin for anything except as a Java alternative and Android.<p>There&#x27;s better options from companies that are less adversarial to their community.
评论 #30818027 未加载
评论 #30817631 未加载
评论 #30817654 未加载
评论 #30818664 未加载
评论 #30817688 未加载
评论 #30820620 未加载
评论 #30821578 未加载
评论 #30820093 未加载
评论 #30819628 未加载
评论 #30820964 未加载
评论 #30818150 未加载
评论 #30818047 未加载
jurmous大约 3 年前
We use Kotlin JS in production and like it quite well. It enabled us to easily share code with the Kotlin backend and Typescript frontend. Kotlin also generates Typescript type definitions which enables us to easily call those Kotlin methods from typescript. The multiplatform vision allows us to compile&#x2F;share natively code for mobile platforms too.<p>I also love to see the quickly evolving Jetpack Compose which would enable to write natively executed UI code on most major platforms. (iOS is not there yet and likely depends on new memory model which is currently being developed.)
评论 #30819265 未加载
jarl-ragnar大约 3 年前
One of our lead developers at work pushed this for a rush demo job last week (he’s a Kotlin advocate). He spent the week fighting with lack of documentation and has now given up and reverted to plain old javascript.<p>I’d just use Clojurescript.
评论 #30819075 未加载
评论 #30818657 未加载
Aeolun大约 3 年前
My problem with this is that it’s absolutely unclear to me how to even get started. The whole Java landscape is full of magic to me.<p>Getting started with node is a matter of downloading a single binary, writing one js file, and executing it with said binary.<p>Upgrading that to Typescript is a matter of downloading another binary, and running the two in sequence.<p>Conversely, Java feels like I have to develop a whole program just to get my program to run.
评论 #30818995 未加载
评论 #30818636 未加载
评论 #30818340 未加载
评论 #30820745 未加载
评论 #30819880 未加载
评论 #30818357 未加载
skybrian大约 3 年前
This might be more appealing to programmers outside the Java ecosystem if it didn&#x27;t depend on Gradle.
评论 #30817740 未加载
评论 #30817821 未加载
评论 #30818144 未加载
评论 #30819005 未加载
评论 #30817549 未加载
评论 #30817783 未加载
评论 #30818179 未加载
评论 #30817871 未加载
lokedhs大约 3 年前
My project is a programming language interpreted, and from the start it was written in multiplatform Kotlin. Then als to this it was trivial to create a web frontend where the entire implementation runs in the browser. All of this is done without a single line of Javascript, which helps in reducing the pain of web development.<p>The primary implementation is running on the JVM, but almost all code is also reusable in the web version.<p>It&#x27;s all open source so anyone that is curious about how this looks like in an actual project is freelance to have a look here. <a href="https:&#x2F;&#x2F;kapdemo.dhsdevelopments.com" rel="nofollow">https:&#x2F;&#x2F;kapdemo.dhsdevelopments.com</a>
hitekker大约 3 年前
pron wrote an insightful comment on Kotlin’s future sometime ago, <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24197817" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24197817</a>. He has actively commented on Kotlin this past decade in good faith. The key quote:<p>&gt; Kotlin&#x27;s design goals are now contradictory. It seeks to be a low-overhead language, i.e. provide abstractions that don&#x27;t add overhead over the target platform, give access to all platform capabilities, and at the same time target multiple platforms -- Java, Android, LLVM and JS -- over none of which does Kotlin exert much influence (maybe a bit on Android).<p>I agree with pron. I don’t see the longevity of the language outside of Android. Too much of drive to use Kotlin focuses on developer experience hype, which is great for starting projects but pretty bad for maintaining them a decade later.
评论 #30819494 未加载
评论 #30817907 未加载
评论 #30818237 未加载
评论 #30817827 未加载
评论 #30818162 未加载
bsaul大约 3 年前
I wish apple realize that kotlin multiplatform is the real threat to the swift ecosystem, and that they refocus the swift project on making it a true cross-platform language
The_rationalist大约 3 年前
It exports typescript typing too. We are successfully using it for sharing businesses code from our backend with our frontend! Even models can be shared.
评论 #30818069 未加载
syzygyhack大约 3 年前
&gt; we do not want to encourage people whose personal preference is not to use JetBrains development tools.<p>Ridiculous take. Waste of a good language frankly.
评论 #30819328 未加载
评论 #30819344 未加载
math-dev大约 3 年前
Very cool stuff, I feel like I need to definitely learn Kotlin more now<p>Swift + Kotlin + Java + C + JS + Lisp + C++ should have you covered for most things
评论 #30817521 未加载
epolanski大约 3 年前
This is very exciting, I have wanted to try Kotlin for quite some time and one of the biggest reasons has been few libraries such as arrow-kt[1].<p>&gt; Kotlin&#x2F;JS provides the ability to transpile your Kotlin code, the Kotlin standard library, and any compatible dependencies to JavaScript.<p>What does it means &quot;compatible dependencies&quot;?<p>[1] <a href="https:&#x2F;&#x2F;arrow-kt.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;arrow-kt.io&#x2F;</a>
评论 #30819451 未加载
xrd大约 3 年前
It says you could build React applications. What about Svelte?<p>Also, what are the pros&#x2F;cons over using typescript? I personally dislike typescript but used to love Kotlin when I was doing more Android development.
评论 #30817694 未加载
评论 #30817492 未加载
Svoka大约 3 年前
Kotlin, the first and only language made to be (single) IDE friendly.