Matthew McDonald

Results 66 comments of Matthew McDonald

> I _suppose_ it could be useful to match on an Iterable if the patterns are always careful to use something like `...` so that you never need to access...

> Dart iterables are not a good match for lazy linked lists. They have a length. I’m not convinced that the presence of a `.length` getter disqualifies `Iterable` from being...

I ended up writing a third version of my program for comparison. This time using a custom lazy linked list data structure, where the lazy links are backed by an...

@lrhn > The reason the hacky version seems efficient is probably that it's actually backed by a list. If you know that, you can just use list patterns. Try a...

@dickermoshe I'm not sure writing `copyWith` this way is better than what you can currently do with https://github.com/dart-lang/language/issues/314#issuecomment-3058739700 or https://github.com/dart-lang/language/issues/314#issuecomment-3061520426. Your way is a bit easier to implement perhaps, but...

@dickermoshe It is typesafe. The end user can pass only the correct types. The use of `Object` within the implementation is not exposed to the user calling `copyWith`.