5 ms·
Dart - Is dynamically typed at the core - Has no support for nullability - Has old school syntax for constructors, semi colons In other words, Dart on the w
by hota_mazi 7y ago
Dart
- Is dynamically typed at the core
- Has no support for nullability
- Has old school syntax for constructors, semi colons
In other words, Dart on the wrong side of history for pretty much every single important feature for programming languages in 2020.
Even C# looks more modern than Dart from a design perspective, and C# is fifteen years old.
- pjmlp 7y agoAnd you weren't counting the matury of the eco-system.
- brabel 7y ago- Dart 2 has a sound type system and the compiler has been receiving lots of optimisations based on types since then (several years now). So this is no longer true. - that's currently true but in the next release (at least that's what the Dart team have been working on for the past several months) it will have nullable types just like Kotlin. - That's a strange criticism. Dart has excellent constructor syntax, I don't know a language that is more flexible with constructors. e.g. class Person { String name; int age; Person(this.name, this.age); String toString() => "Person($name, $age)"; } main() => print(Person("Joe", 40)); Looks pretty good compared to most other languages?!
- krzat 7y agoThe fun starts when you want to have final field that needs to be calculated in the constructor.
- filleduchaos 7y agoSo do that in the initializer list?
- hopia 7y agoDart has some annoying traits that hurt productivity with it. For example, the lack of union types or some kind of sealed classes is fairly annoying when the language is actually statically typed. There's some work being done to overcome this but so far no solution has seen the daylight in practice.
- scalatronn 7y agoRelax, it's being speced now, give them time to make non-nullables first.
- joe_fishfish 7y agoIf they had figured out a way to make Flutter use Kotlin back in 2015 before Android officially adopted it, I think it would have gained much more developer adoption. I don't think Kotlin is performant enough for Flutter though.
- pjmlp 7y agoThe hard work is done by Skia, implemented in C++. ART is able to do several nice optimizations, including vector instructions, and uses a mix of JIT/AOT with PGO. Kotlin is performance enough, hence Jetpack Composer.
- filleduchaos 7y agoAt the time (and to a large extent even now) Kotlin would have required shipping a JVM along (on non-Android platforms at least, and not a straightforward task at all on iOS). That's _far_ from performant for the use case in question.
- pjmlp 7y agoAs if Dart doesn't ship a runtime into all the platforms it runs on. A quite big one actually. That has nothing to do with performance, and plenty to do with storage space and download times, as anyone knowledgable how compilers work is well aware of.
- scalatronn 7y ago> As if Dart doesn't ship a runtime into all the platforms it runs on. > A quite big one actually. yeah, whole 4,5 mb....
- filleduchaos 7y agoDo you _really_ want to compare the size on disk and [default] memory requirements of, say, HotSpot to the Dart AOT runtime?