4 ms·
> Dart is a really _ugly_ language with lots of tiny annoyances. Its as if someone took worst parts of Java and Javascript and turned them into a language. Terr
by nmfisher 2mo ago
> Dart is a really _ugly_ language with lots of tiny annoyances. Its as if someone took worst parts of Java and Javascript and turned them into a language. Terrible to write, terrible to read, terrible to use.
While I’m a bit ambivalent towards Flutter, I totally disagree with you on Dart. To me it’s a better version of Java/Typescript with a very mature cross-platform and JIT/AOT compiler. Admittedly there are some things I wish they would take from TS (like discriminated unions), and I haven’t tried “modern” Java either so maybe that’s improved, but even so, I rarely feel like Dart is getting in the way.
- satvikpendem 2mo agoThey probably just haven't used the latest Dart versions which fixed a lot of the "ugliness" (which I'd call pragmatism but regardless) like primary constructors where a class can just be a single line now. And I mean, their entire comment is a way to shill their app so I wouldn't take much stock in what they're saying.
- brabel 2mo agoYeah I have no idea how someone who has used all these languages can come up with a conclusion like Dart is “uglier”. I really want to know what exactly they think is ugly about it!
- anthropodie 2mo agoThey have written their own UI framework. Probably the reason they are biased against other frameworks
- hypendev 2mo agoI am biased - but mostly because I have actively used these in my career for quite a while now and encountered pains with both writing new code, upgrading old code and worst, inheriting code or helping debug someone else's code. When given a choice, I'd rather use bland React Native nowadays than Expo or Flutter - one is a legacy addon to a framework, while the other sounds like a good idea until you step on a nail or have to read some _bad_ code. And there is a whoooole lot of bad flutter code out there due to relaxed language semantics.
- hypendev 2mo agoMostly its the core syntax, it's terribly noisy. Also parts of the implementation itself. While I cannot enumerate the taste, I can give you some examples. For example: - Class constructors cannot be in definition headers, i.e. class Something(Int a, Int b) - The whole final and const/static const mess - required is annoying and really "slapped on" - shorthand syntax is => instead of =, personal pet peeve - positional, named and optional parameters segregation makes things noisy - concurrency, in which an event loop sounds like a great idea but ends up causing pain with multi-threading and background work so you have to spawn diff isolates - the whole `await fn()` vs `fn()` validity issue, where you can miss the await keyword and it still compiles is such a slap in the face. think now they solved it, but you could also have returns from non-return functions and vice-versa. - `dynamic` and generics in the same language have caused many bad designs - extension types also feel hacked on - type inference is annoying and highly contextual vs out of the box - Worst sin: DateTime.now() returns different things based on the platform its running on, making it highly unreliable for something so important
- brabel 2mo agoI don’t want to sound harsh but that’s the least convincing list of language misfeatures I’ve ever seen. Almost every point is so minor I am surprised you didn’t mention having to type semicolons and similar incredibly inconsequential things.
- hypendev 2mo agoThey are minor, but that is why I called it ugly - not bad. It's a matter of taste, and Dart's syntax style doesn't match mine. As much as I tried to enjoy it, after a while I just couldn't look at it anymore. All of these accumulate and make it feel overly noisy for a lazy brain.