Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

- 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?!


Dart 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.


Relax, it's being speced now, give them time to make non-nullables first.


The fun starts when you want to have final field that needs to be calculated in the constructor.


So do that in the initializer list?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: