Lasse R.H. Nielsen

Results 772 comments of Lasse R.H. Nielsen

The bound `T extends A with B` is not allowed. You must write a single type as the bound and `A with B` is not a type. It represents a...

I think it's fine too. We *should* be aware that it probably means that some programming patterns will consistently give identical records, and some will not, and people may start...

Whatever we do here, we should probably do *precisely the same* for data-classes — with some suitable definition of "same shape", which for data-classes is likely the same struct declaration...

One thing to consider: Can identical return `true` for records that were not declared with identical content, as an optimization. Consider a program where the record shape `(_, _, _,...

We may or may not need to specify `identityHashCode` on records. The `identityHashCode` function returns a hash code which is best-effort-useful and compatible with `identical`. It's valid as long as...

Good point that `==` should perhaps keep all fields alive, and it's going to be very hard to see that `==` is not called. (For web compilation, we should totally...

We currently don't allow any kind of destructuring in constant expressions. We don't allow `constantList[0]`, even though knowing the constant list at compile time would make it very easy to...

The problem with an await pattern is that it must await a future *before* knowing whether the pattern matches. If I do `switch (someObject as Object?) { case await int...

Doing the await only if a pattern has not been rejected yet means that optimizations can change timing: ```dart case (await var x, int y) = pair; ``` can be...

TL;DR: An un-boxable type must not have any concrete subtypes. > * May a concrete struct extend another concrete struct? It does prompt the question of what happens on an...