3 ms·
Ask HN: Is Dart a particularly optimised language for front-end development?
Hi. I remember when Dart was introduced, it was supposed to be a "JavaScript alternative" (?) for browsers.
It however "evolved" into being almost only used in Flutter, for developing mobile, web, and desktop front-end development.
It seems bizarre to me that a language is so special-purpose for front-end. Even Ruby has some fringe use cases beyond Rails.
Does Dart have any particular features that justify such a decision to bind Flutter to it? Or it has all been accidental?
Thanks
- gethly 10mo agoDart just never took off. It's as simple as that.
- theanonymousone 10mo agoSo why did Google make such a choice for their front-end framework?
- moomoo11 10mo agoFlutter is pretty bad at least when compared to react native with expo these days. I was big into flutter but it’s just pretty bad overall when compared to expo.
- chistev 10mo agoReally? I always read people say Flutter was more performant.
- gagik_co 10mo agoFlutter developer experience is top notch. The best place you can see this is by comparing the experience of upgrading React Native vs upgrading Flutter. Flutter Web with WASM is also very cool. If you’re using a bespoke design for your app and don’t care about looking native, it’s overall a more predictable way to manage cross platform development. That said, React Native has many great third party libraries whereas Flutter is dominated by a lot of low quality solutions.
- moomoo11 10mo agoExpo and the library quality is day and night compared to flutter. Flutter has potential but just like any other Google tech it’s just shitty over time due to lack of TLC.
- muzani 10mo agoI usually consider it more of a spectrum, with the left being more suited to fast iteration/abstraction, and the right being more useful for control:- Expo / RN → Flutter → KMP → Native
- muzani 10mo agoThere's BE options for Dart too like Serverpod [1] But IMO, languages should focus on a niche. Dart has a clear niche - mobile. It handles mobile and responsive layouts very well. It handles async well (mobile operating systems, mobile lifecycles, web). It handles lightweight client-side databases well. It handles state management easily. Meaning you can chain things like login -> GET user email -> GET user avatar -> show avatar. It translates all this logic well across platforms. Naturally it coupled well with Flutter and cross-platform. Complexity scales logarithmically rather than exponentially, compared to say, a native Android stack from 2017 built with fragments, events, and data binding XML. It went so well that Android and iOS started copying the way Flutter did things. [1] https://docs.serverpod.dev/ https://docs.serverpod.dev/
- guntis_dev 10mo agoLast time I checked, Dart+Flutter on web renders everything to canvas, which means you lose browser fundamentals: native text selection, accessibility features, screen readers, right click context menus, inspectable DOM elements, and SEO. You also can't use browser dev tools to inspect the UI like you normally would. The bundle sizes are also quite large compared to typical web frameworks, and you don't get progressive enhancement - it's all or nothing JavaScript. Maybe things have improved in recent years, but I haven't seen much adoption or buzz around it.
- Alifatisk 10mo agoDart failed to become JS alternative because browser makers rejected native Dart VM for obvious reasons. There have been lots of previous discussion about Darts strengthweaknesses and why Google chose Dart for Flutter. To sum it up, Darts strengths is JIT/AOT compilation, hot reload, concurrency, null safety to deliver performant UIs across platforms without JS interop or markup bridges. Google tested other languages but stuck with Dart for its “UI as code” fluency, hot reload that preserves app state and native performance parity on mobile/web/desktop. Of course, other frameworks and languages is catching up to features and DX that Dart and Flutter offers. Even though Dart was meant for UIs, there is work being done to make it a viable option for backend dev as well, see Serverpod. Dart also finally implemented cross compilation this year which helps with shipping binaries to other machines. https://github.com/dart-lang/sdk/issues/28617 https://github.com/dart-lang/sdk/issues/28617