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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Pros and Cons of the Dart Language?

4 点作者 rlawson4 个月前
I have been working with flutter and have come to really like Dart. I'm primarily a Java dev and to me Dart feels like a lighter Java with better dev experience. I am considering using it in other areas - command line projects, webapps - basically places I would have used Java, Python or Go. What are pros/cons people have found in using Dart outside of the flutter ecosystem?

1 comment

Alifatisk4 个月前
Here&#x27;s the cons from my experience.<p>Dart does not cross-compile, it&#x27;s still an issue to this day and there haven&#x27;t been any plans to fix that yet from what I can tell. <a href="https:&#x2F;&#x2F;github.com&#x2F;dart-lang&#x2F;sdk&#x2F;issues&#x2F;28617">https:&#x2F;&#x2F;github.com&#x2F;dart-lang&#x2F;sdk&#x2F;issues&#x2F;28617</a><p>Another slight issue I&#x27;ve found is the error message it spits out is kinda unhelpful most of the time, but that issue also applies to Flutter. The stacktrace is like 100 lines with only the five first rows is helpful, the rest is internal code.<p>Dart lacks a repl (there is this package called Interactive but it&#x27;s a hacky solution).<p>One last thing I do not enjoy about Dart is that even if the code compiles, you are not guaranteed that the massive refactor you did is &quot;sound&quot;, that will say, errors can popup during runtime, so you have to write tests for every part. This is such a bummer because in Java, if I do a large refactor and the linter, ide and compiler is happy, then you will likely be rest assured that the program will run fine (JavaFX is a exception).<p>Dart is a language meant for ui development, nothing else. The team doesn&#x27;t seem interested in splitting up the language from the Flutter framework. There have been tons of work from the community to provide tools for standalone application &#x2F; backend development (see Shoelace and Serverpod).<p>The pros is a beautiful, expressive language with awesome DX. Good range of packages available and easy to meta-program with, it&#x27;s not on the Ruby level but with &quot;extensions&quot; you can do lots of fun stuff. Dart deserves more love than what it currently gets.
评论 #42695255 未加载
评论 #42686614 未加载