Matthew McDonald
Matthew McDonald
Would it be possible to use the name of a positional field if a name is provided in the type? ```dart (int x, int y) position = (5, 10); print(position.x);...
> I believe the point of having positional fields is to deliberately _not_ expose the names of the fields in an API, similar to how you can't pass positional arguments...
I don't know if this was considered but couldn't you also use types to differentiate between a parenthesized expression and a unary record? ```dart int number = (1); (int) record...
Why not have `toString()` implement this behavior instead of adding an additional `toDebugString()`? Other languages with a similar feature use this approach, for example: Data classes in Kotlin: ```kotlin data...
IMO, `collection if` would make more sense in parameter lists as part of [varargs](https://github.com/dart-lang/language/issues/1014) (if it is ever implemented). With varargs you could potentially support all of the collection operations,...
> Interesting idea. The grammar won't work, `sync* [ .... ]` is currently valid syntax if `sync` is a variable of a type which has a multiplication operator . Probably...
@eernstg I use the [curly_braces_in_flow_control_structures](https://dart-lang.github.io/linter/lints/curly_braces_in_flow_control_structures.html) lint rule in production code. I'm sure many others do as well since the [pedantic](https://pub.dev/packages/pedantic) package uses this lint rule. So I think a more...
> Also, of course, the fact that the function allows statements rather than elements (or other expression-ish terms) allows the function bodies to be more expressive than the collection literals....
I came across this today and thought it was interesting. Apparently rust is considering similar features: - https://www.youtube.com/watch?v=jzaU7Braljo - https://hackmd.io/9v81TQSgQcaAiqvHQtzN8w?view#Status-quo I have no experience writing rust programs (YouTube somehow recommended...
> I have wanted a syntax for iterable literals like this in the past. I think it fits well with enhanced collection literals and would let us write more code...