Erik Ernst

Results 1003 comments of Erik Ernst

I'd like to comment a little on the reliance on dynamic type checks in relation to covariance. @luanpotter wrote: > the language design is to consider everything to be "covariant...

> We would probably also want `x == "foo"` to promote `x` to `String` in general We could probably do that for `e == x` where the static type of...

Another request for a feature covered by this discussion occurred here: https://github.com/dart-lang/sdk/issues/45015 ```dart void main() { final today = DateTime.now(); DateTime? userDate; DateTime firstDate = (userDate?.isBefore(today) ?? false) ? userDate...

Looks good! However, it won't take long before we get this request: ```dart (int, int, {int x, int hashCode}) p = (0, 1, x: 2, hashCode: 3); for (var index...

The question about the least upper bound of two tuple/record types is basically determined by the subtype structure (cf. #1278): If we have `DestructureN` types then there's subtyping among different...

No promises, but it's on the radar..

For current activities in this direction, you may want to consider also issues like the following: dart-lang/language#117, dart-lang/language#125, dart-lang/language#225, dart-lang/language#308.

I think it might be at least as important to have a non-null test (`?`) and non-null check ('!') pattern which is applicable to a composite pattern, and the ability...

Good catch! However, the support for `flatten(X) == T` where `X` is a type variable (promoted or not) with bound `Future` has actually already been addressed in the null safety...