Lasse R.H. Nielsen

Results 1340 comments of Lasse R.H. Nielsen
trafficstars

> Should static extensions work when the on type is a typedef? Yes. It's just another way to write a type. We have rules for when you can access static...

And more reasoning why we should allow it. A available extension declaration of ```dart static extension MyList on List { List.singleton(T value) : this.filled(1, value); static List parse(String list) =>...

Since `T extends T` is satisfied by any type, it's a useless bound. The other ones are similarly useless as a bound because `T` always occurs directly in the union....

Seems reasonable. I don't see any use for a self-referential type variable bound. It's trivially satisfied by any type, so it makes no difference. We can accept it, but that...

If we call it "union base type" instead of "union reduction", and/or avoid saying "erase union", I'm fine with it too. It might be enough to just say "reduce the...

I'm not worried about increasing popularity. If you don't need the feature, you don't need it. When you do, and I occasionally do for constant constructors with validation, it would...

The problem with multiple upper bounds is that it effectively introduces intersection types. That raises a lot of questions that need to be answered, in a satisfactory and consistent way,...

Disallowing conflicts in interface is a reasonable answer to the first two items. If you know that there exists a subclass implementing both, which has a compatible override of both...

Using a pair of values (possibly optional) solves the problem of assigning two types to one value, by assigning two types to two values. What it loses is having only...

@Wdestroier This is a perfectly good description of actual intersection and union types (which is issue #1222 ). If Dart had those, this issue would not be needed. What is...