Hacker News new | ask | show | jobs
by christopherslee 4322 days ago
My developer experience with Dart was not a good one. The most succinct way that I read from other developer experiences on the internet was, "It's the worst parts of Java brought into Javascript". Not intended as a trolling statement, but like other folks have posted, it didn't strike me as having provided interesting value/productivity gain.
2 comments

Since starting with Dart, everytime I am back in JavaScript-land I cringe when I run into 'undefined' errors and other trucking-along road bumps (DateTimes are mutable in JavaScript, srsly?).

Dart let's me focus on the app I'm writing, the data structures, the business logic & the overall architecture as well as value is I'm providing to my customers without getting held up with heisen-bugs.

This has a lot to do with getting into the zone/flow. I personally don't want to run into things like language insanities while I code, I also don't want to accumulate a huge repository of patterns or workarounds to avoid the bad parts/minefields of a language.

I wonder where the "It's the worst parts of Java brought into Javascript" FUD is coming from.

As I see it Dart avoids the worst parts of Java (http://www.javapuzzlers.com/) and JavaScript (https://www.destroyallsoftware.com/talks/wat) and mixes it up with great parts borrowed from various languages and platforms (mixins, streams, async/await, …).

Dart is a dynamic language at heart, yet provides great performance (even faster than JavaScript which by now has pretty fast implementations in the wild compared to ruby/python): https://www.dartlang.org/performance/

If you are used to tooling support (autocompletion, warnings/hints, code navigation like in Java/Scala/C#) on a level which traditionally only statically typed platforms offered you also get it with Dart (see support for IntelliJ/Webstorm: https://www.dartlang.org/tools/webstorm/ & Sublime: https://github.com/dart-lang/dart-sublime-bundle).

So I don't really understand where the "worst parts of Java brought into JavaScript" sentiment comes from. I'd like some concrete examples.

I had the exact opposite experience. I was vastly more productive in Dart then in JavaScript. The code result was also more clear and understandable. I would say "readable", but often pretty looking code is as understandable as the Brain Fuck language.
I'd be curious, have you tried coffeescript?

I'm not a javascript fan by itself, but I do like coffeescript. I was probably making a comparison in my mind of coffeescript vs dart?

The main problem with CoffeeScript is that you're still talking about the exactly same type system and mostly the same problems, minus some superficial fixes and plus some syntactic sugar.

I prefer more heavy-weight approaches that use Javascript as a compilation target. Clojure and Scala can both compile to Javascript, but you're talking about different communities, libraries and tools, so very much like Dart, but focused on targeting just Javascript VMs.

Yes, I wrote coffeescript daily for a few months. It is also much more productive then JavaScript is, and I do enjoy it more then JavaScript, but I still find it lacking compared to Dart. Dart gives you the option of static typing. Static typing speeds up development because the compiler itself gives you a bunch of free debugging effort. I also find it much easier to manage includes and layout of the code. There is no need for tools like require.js, browserify, or bower.
I made the same journey.

JavaScript => CoffeeScript => Dart.

I think once you've took the red pill of "There has to be something which is better than JavaScript" it is hard to go back.

Once you've written some CoffeeScript you will start to long for even more semantic improvements beyond classes, preventing you from polluting the global namespace and being able to bind `this` using the fat arrow.