3 ms·
I've spent the last couple years using Dart as a backend language, and even working with the Dart team on a couple improvements to core packages. It's a really
by endtime 5y ago
I've spent the last couple years using Dart as a backend language, and even working with the Dart team on a couple improvements to core packages. It's a really nice language, supported by Google, and transpiles to JS.
- auggierose 5y agoSame as for Scala. I've shipped a Dart app last year, but the language is not as nice as Swift, and reminds me too much of Java.
- endtime 5y agoDid it remind you of the bad parts of Java, or was it a more superficial resemblance? When I've used Java, what bothered me was the apparent overabstractions and complicated frameworks for simple things. I've never seen that in Dart. I feel like Dart gets me reasonably close to the kind of elegant, intuitive code I can write in Python...but with static typing.
- auggierose 5y agoDart is a fine language. But I struggle to understand why it exists in the first place, there is nothing in there that is done better in Dart than in other languages. Yes, Java has some "Enterprise" problems, but the language itself is just like Dart. Really, they could have just used Java, they probably didn't do it for legal / political reasons. What I like about Swift is its "protocol oriented programming", which is basically pragmatic Haskell type classes. There is just so much done right in Swift, that I have a hard time going back to any language that doesn't have it: * protocols, integrated with struct/enum/class * dot-syntax when the context is known (like .blue instead of Color.blue) * immutable data structures via copy-on-write, nicely integrated into the language * best integration of optional type (like Int?) I've ever seen in a language * (optional) named function parameters (in the beginning I was annoyed, but now I am a big fan) * the way exceptions work * cheap garbage collection (kinda; ARC is working like garbage collection for most of the code I write) * great package system * great IDE (Xcode)
- endtime 5y agoAh, thanks for clarifying. I don't think Dart is quite so similar to Java that it needn't exist, but I understand what you meant better now. I haven't used Swift, and I'm not likely to, but it sounds pretty good.
- treis 5y agoHow is the experience in debugging production issues with this sort of transpiling? Like how do you match a Javascript stack trace of an error back to the Dart code?
- endtime 5y agoI actually wasn't transpiling to JS, I was running the Dart VM. VS Code + standard Dart extensions works great for debugging.