Lasse R.H. Nielsen

Results 1594 comments of Lasse R.H. Nielsen

One possible reason for the code is that it predates Dart 2.0, so people writing literals like `{"foo":"bar"}` would not get type inference, and the code would allow `{"foo": "bar"}`...

It does worry me a little, conceptually. If you catch an exception and handle it (by wrapping), you seem to be at an abstraction boundary. You are changing the messaging...

It sounds like we have two APIs, one future based and one stream based. They should probably act differently. It's hard to say what a "timeout" means if the author...

We cannot make `contains` do what we want, because it must accept a `String` (because `Characters` is an `Iterable`). Allowing it to accept either a `String` (which must be a...

I've become more inclined to allow `Characters` as arguments as well, and make it work like `containsAll` in that case. Still not a good idea to allow strings containing multiple...

The `contains` method now takes `covariant String` as argument in the interface, which should catch attempts to call it with a `Characters`. It still takes `Object?` in the implementation, so...

To be precise, `DateTime.now` is perfectly testable, but code that *depends* on it is hard to do coverage testing for since you can't control the values going into that code....

While probably convenient, I don't think we'll change the `Set` API at this point. Which means this will at most be an extension method. That sounds reasonable, and it can...

The biggest obstacle I've noticed so far is `runZonedGuarded`. It's used in several places to catch all errors from a function, even those from a `Future` returned by that function,...

Have CL: https://dart-review.googlesource.com/c/sdk/+/255400 Patchset 2 makes `runZonedGuarded` catch async errors and return a non-completing future in that case.