Dart Blog

medium.com/dartlang · Company blog · on HN since 2017

The Dart team's Medium blog announces Dart releases and explains language design choices such as sound types and nullable types.

What HN saysHN commenters cite it for Dart's sound type system, the end of open-source AngularDart maintenance, and release news tied to Flutter.
68HN people shared it
23linked it in comments
76stories submitted
1.0Kstory points
2 years agolast shared
2017people per year2026

Most-shared posts

  1. 1
    Announcing Dart 2: Optimized for Client-Side Development
    10 people · 22 points · first shared 2018 · 2 comments on HN
  2. 2
    Making Dart a Better Language for UI
    7 people · 37 points · first shared 2019 · 4 comments on HN
  3. 3
  4. 4
    Dart on LLVM
    6 people · 26 points · first shared 2017 · 1 comments on HN
  5. 5
  6. 6
  7. 7
    Announcing Dart 2.5: Super-charged development
    4 people · 17 points · first shared 2019 · discussion on HN
  8. 8
    Why nullable types?
    3 people · 130 points · first shared 2020 · 115 comments on HN
  9. 9
    Announcing Dart 2.7: A safer, more expressive Dart
    3 people · 18 points · first shared 2019 · 5 comments on HN
  10. 10
  11. 11
    Null safety in Dart goes beta
    3 people · 10 points · first shared 2020 · 1 comments on HN
  12. 12
    Experimenting with Dart and WASM
    3 people · 4 points · first shared 2021 · discussion on HN
  13. 13
    Dart and the performance benefits of sound types
    3 people · 2 points · first shared 2021 · discussion on HN
  14. 14
    Dart 3
    3 people · 1 points · first shared 2023 · discussion on HN
  15. 15
    Announcing Dart 2 Stable and the Dart Web Platform
    2 people · 246 points · first shared 2018 · 253 comments on HN

What HN people wrote when they linked it

IshKebab · 2023-07-09
This is a good read: https://medium.com/dartlang/dart-and-the-performance-benefits-of-sound… That said I really doubt JS will actually get sound static types ever. Typescript is not sound.
vsmenon · 2022-12-08
Regarding AngularDart, see: https://medium.com/dartlang/angulardart-flutter-and-the-web-spring-upd… TL;DR - It's still heavily used inside of Google, but the team decided to stop maintaining the open source version of it. It was a fair bit of work to do both - different build rules, different tests / test infra, different priorities. Effectively, AngularDart has been forked. There is an internal-only version that is actively developed, and there is an external community project. Regarding Flutter on the Web, there is a lot of active work, but I'm not the best to speak to all of it. On the Dart side, it's one of the major reasons we're investing in things like compilation to Wasm.
brabel · 2022-05-11
Flutter 3 comes with an upgrade to Dart 2.17 [1], which has quite a few improvements as well... including state on enums. While that's great, I was hoping it would be like in Rust, where each enum variant can declare its own state components, but unfortunately it seems to be more like Java: same state for all variants. Well, at least there's quite a few other small but useful improvements... and they showed how they really listen to the community by implementing the new syntax for passing on constructor parameters to a super-class... and by improving the docs of the 200 most popular packages with lots of examples, as requested by the people. I like how they're listening to the community as well to implement meta-programming (like macros) [2] to solve the main pain point, currently, in Dart, which is how verbose it is to generate code for things like serialization and data types. Once they get that, Dart will be a really good language to work on (it's already quite ok IMO, despite most people, usually those who don't actually use it much, hating on it). [1] https://medium.com/dartlang/dart-2-17-b216bfc80c5d [2] https://github.com/dart-lang/language/issues/1482
lasagnaphil · 2020-02-15
Dart actually observed this exact thing and added if expressions inside the language; more exactly, "if" works as an expression if it is inside of an initialization of a collection. It might seem a bit less elegant that the semantics of such an important token changes with context, but I think it solves this particular problem pretty well. Dart also has spread operators and for-expressions to make writing "UI with code" much easier. It's fresh to see how language design choices are being made more by pragmatic ones (for Dart it's the fact that it's primarily being used for Flutter to make UIs) instead of ideological ones (One might claim that "if" should be a pure expression following the tradition from functional languages like ML, but that also has its own set of problems in a language designer's perspective) https://medium.com/dartlang/making-dart-a-better-language-for-ui-f1cca…
isoos · 2017-04-30
The code seems generate to generate a very simple service worker that enables offline more for the web app: it puts the static assets in a cache that serves them if the network is down. While it is a great start, and nothing wrong with that, I encourage people to check the more advanced features of routing and caching, where you have much better control of what is happening in the service worker. I have found the best JS library for that is sw-toolbox: https://github.com/GoogleChrome/sw-toolbox Shameless plug: I have also developed a Dart library for progressive web apps: https://github.com/isoos/pwa One significant advantage of the library over the original solution is that you can have offline mode without sweating as much as 100-ish characters: https://medium.com/dartlang/making-a-dart-web-app-offline-capable-3-li… (Scroll ~to the middle, super-simple to setup). Another advantage is that cache invalidation is really hard. Neither the linked quickstart, nor the sw-toolbox addresses this, but there should be a way to control your cache updates, invalidations, and making sure you don't leave it in a broken state. Also, these should make sure that you don't pollute the user's browser too much. My pwa package does cover a lot of these edge-cases, and I'm happy to answer questions wrt/ pwa caching if there are any. (Next up: messaging solution between service workers, web workers, isolates...)
munificent · 2023-09-22
We recently added pattern matching to Dart [1], so I'm always keen to see how it compares to similar features in other languages. In case it's interesting, here's that Ruby example ported to Dart: print(switch ( {'name': 'John', 'friends': [ {'name': 'Jane'}, {'name': 'Rajesh'}]}) { {'friends': [ {'name': var firstFriend}, ...]} => "matched: $firstFriend", _ => "not matched" }); Pretty similar! The main differences are that Dart doesn't have symbols, so the keys are string literals instead. Also, variable bindings in patterns are explicit (using "var") here to disambiguate them from named constant patterns. [1]: https://medium.com/dartlang/announcing-dart-3-53f065a10635
cageface · 2023-08-12
Dart has been evolving rapidly. It remains to be seen if Google will stay committed to it but you can hardly call it dead today. https://medium.com/dartlang/announcing-dart-3-53f065a10635
sngz · 2023-01-13
Yes it's Object oriented, it was supposed to replace JS long time ago, but google kinda dropped the ball on that. I wish it replaced JS. Dart was almost dead for a long time but flutter kinda saved it. Developing on flutter for cross platform applications has been a joy to work with even though there are still a lot of drawbacks to flutter right now. you can find their blog here where they talk about future releases and planned features https://medium.com/dartlang
haberman · 2022-05-14
Some of the results look outdated. The Dart results look bad (25x slower than C), but looking at the code (https://github.com/dyu/ffi-overhead/tree/master/dart) it appears to be five years old. Dart has a new FFI as of Dart 2.5 (2019): https://medium.com/dartlang/announcing-dart-2-5-super-charged-developm… I'm curious how the new FFI would fare in these benchmarks.
_delirium · 2022-02-06
It compiles to JS: https://dart.dev/tools/dart2js The Dart team is investigating a dart-to-wasm compiler, but is waiting on the Wasm GC proposal to be standardized: https://medium.com/dartlang/experimenting-with-dart-and-wasm-ef7f1c065…
markdog12 · 2021-03-03
novok · 2020-01-04
TBH skimming the dart language, the only thing that was holding me back was the lack of optional types, and with dart 2.7 it looks like they've added it: https://medium.com/dartlang/dart-2-7-a3710ec54e97
skybrian · 2019-12-11
I don't know how well they're supporting desktop and web UI idioms yet, but it looks like you can try out Flutter on the web using DartPad: https://medium.com/dartlang/a-brand-new-dartpad-dev-with-flutter-suppo…
jopsen · 2019-03-21
I was involved with json-e a while ago: https://taskcluster.github.io/json-e/ Which to me seemed more intuitive. But I'm also pretty excited about the UI-as-code features happening in Dart: https://medium.com/dartlang/making-dart-a-better-language-for-ui-f1cca… Mostly I prefer YAML w. json-e because it's declarative and expressive enough for those few cases where you needed fancy stuff.. But the new Dart features coming up, makes me think I could write config as code -- we'll see :) (Disclaimer: I work at Google)
irq-1 · 2018-08-07
> The Dart language, libraries, build system, and web development tools have changed. https://www.dartlang.org/dart-2 > ...announcing Dart 2, a reboot of the language to embrace our vision of Dart: as a language uniquely optimized for client-side development for web and mobile. https://medium.com/dartlang/announcing-dart-2-80ba01f43b6
dangjc · 2018-07-29
Dart is being positioned as a cross compiling, Android and iOS (but not web) development language with the Flutter platform. It very much seems like a replacement for Kotlin's usage on Android, but only if you are also switching to this UI framework. https://medium.com/dartlang/announcing-dart-2-80ba01f43b6
thosakwe · 2018-06-17
Dart VM != Dart server in this case. The focus of Dart 2 and beyond is the client side [0]. You can definitely run Dart in the VM, but beyond the HttpServer API, server-side support is mostly a community effort. My point isn't that this is a bad thing, it's that it makes sense for Firebase to be promoted because Dart doesn't have _official_ server-side support. [0]: https://medium.com/dartlang/announcing-dart-2-80ba01f43b6
hajile · 2018-05-16
Runtime size depends on a few things. The biggest is JIT vs native. If you're willing to dedicate the time to making (or interfacing with) a completely native compiler, then the runtime penalty isn't that large. In contrast, any halfway decent JIT is going to be several MB of code (and unlike an image, has to be parsed and executed -- potentially on slow phones). In both cases, the GC issue is non-trivial. LLVM has finally started to make performant GCs possible. Wasm (to my knowledge) doesn't have similar capabilities and guarantees (I suspect the are actually impossible with untrusted GC code). The only viable solution IMO is the addition of GC primitives and hope that your particular language maps well on that specific browser's GC. https://medium.com/dartlang/dart-on-llvm-b82e83f99a70

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close