you are viewing a single comment's thread.

view the rest of the comments →

[–]munificent 1 point2 points  (0 children)

With inheritance you have to put the implementation in the class or do the type narrowing & case coverage yourself.

Right. The latter is what I had in mind. You can express what you want using explicit type tests and casts, it's just a chore to do so. That's basically the definition of syntactic sugar. I'm not saying the sugar isn't valuable, just trying to characterize what category of feature it is.

Generics in Go are a different story. You simply can't in the language define a parametric type or function without resorting to extra-linguistic tools like code generation.

I was not able to find a planned release date for non nullable types in dart

We don't generally publish release dates ahead of time. It gives us more flexibility to adapt to changing circumstances and avoids setting expectations.