4 ms·
I couldn't help reading the emphasized "types" in "optional types" as a yell for the Typescript developers to come back. But I too hope that Dart will become m
by jug 11y ago
I couldn't help reading the emphasized "types" in "optional types" as a yell for the Typescript developers to come back.
But I too hope that Dart will become more successful, because let's stop beating around the bush -- it isn't now, not relatively speaking and comparing to the state of web development today. And this is unfortunatenly _not_ because web development hasn't been rapidly evolving the past few years.
But enough negativity. I found this part the most interesting, because today there are already so many ways to get various non-officially sanctioned languages onto both iOS and Android:
> Soon, you’ll be able to write Dart code for micro-processors (think Raspberry Pi) and — more interestingly — for micro-controllers (think Arduino). This means developing for really compact, really cheap, really low-energy devices is no longer a C/C++/asm club.
Maybe Dart can at least find an unexpected niche?
- saurik 11y agoYou say "TypeScript developers to come back". Did they leave? What did they leave?
- filiph 11y agoI'm the author of the article. > I couldn't help reading the emphasized "types" in "optional types" as a yell for the Typescript developers to come back. Not sure what you mean, but I definitely didn't have TypeScript in mind. I emphasized "optional" in "optional types" in the bulletpoint where I'm talking about "getting out of your way", and "type" in the next bulletpoint where I'm talking about structure. It was meant to be cute but evidently I failed... Sorry for the confusion.
- bovermyer 11y agoI got your meaning. I liked Dart enough to give a talk about it at the local Google user group a year or so ago. Sadly, I haven't touched it since; less because I fear that it's a dead/failed language, and more because I simply haven't found a use case for it where a language I already know better doesn't do an acceptable job.
- jug 11y agoHaha OK, I see it now. :)
- espadrine 11y ago> I couldn't help reading the emphasized "types" in "optional types" as a yell for the Typescript developers Dart was saying this before it was cool! Historically, Dart was (in part) born out of Gilad Bracha's Pluggable Type Systems[1] paper, so the concept of optional types is the very heart of Dart, and was so long before TypeScript. [1]: http://bracha.org/pluggableTypesPosition.pdf http://bracha.org/pluggableTypesPosition.pdf
- Bahamut 11y agoIt also is a way for Dart to optimize over JS at the VM level.
- espadrine 11y agoNot really. Counter-intuitively, all annotated types are thrown out at runtime, as far as I recall. The VM learns about types in the same way that JS VMs do. Dart's performance wins over JS are elsewhere (object construction and access (designed without prototypes to avoid the performance pitfalls of V8's hidden classes), lack of global object, with and eval…). > The VM designers say that in practice, type guarantees really don’t help them nearly as much as you might think, because type checks are not a major drain on performance. https://www.dartlang.org/articles/why-dart-types/#why-do-type-annotations-have-no-effect-at-runtime https://www.dartlang.org/articles/why-dart-types/#why-do-typ...
- incepted 11y agoIt's sad that Gilad's obsession with Smalltalk led to this. I feel that Dart could have been a more serious competitor in that space if it was fully statically typed. No optional types. This would lead to a more credible language and, obviously, a more performant one.
- munificent 11y agoA number of people on the Dart team are working on strong mode[1], which is very close to what you're asking for. I say "very close" because "No optional types" is ambiguous. Type annotations are still optional in strong mode because in most cases it will infer the static type for you. Strong mode still also supports a dynamic type—much like C# does—because that's useful for things like interop or working with data. Strong mode was initially created because it helps produce cleaner JS (unsurprising that static types help with static transpilation) but what we're hearing from customers is that they like it for better type safety and tooling. Even many of the Flutter[2] folks, who don't compile their Dart code to JS at all, are using strong mode because they get better static checking. [1]: https://github.com/dart-lang/dev_compiler/blob/master/STRONG_MODE.md https://github.com/dart-lang/dev_compiler/blob/master/STRONG... [2]: http://flutter.io/ http://flutter.io/