Bob Nystrom

Results 973 comments of Bob Nystrom

I went ahead and removed the synthesized getter names for positional fields from the proposal. This means that currently the only way to access positional fields is using pattern matching...

...and there is a newer issue to discuss this that I think has more up-to-date conversation, so I'll close this one in favor of that: #2388.

I'm really glad you filed this, because it's good to talk about it. I'm familiar with quotation and quasiquotations and it's something I've mulled over as part of the metaprogramming...

> > Instead, we'd probably need some kind of marker to indicate what where in the grammar your quotation is for: > > I have considered this problem before and...

> The primary justifications I have seen for using adjacent strings over `+` is performance. Even a braindead compiler should be able to recognize that a `+` with literals on...

A related data point: an automated analysis of Python repositories found [several cases of missing commas leading unintended concatenation of adjacent strings](https://codereviewdoctor.medium.com/5-of-666-python-repos-had-comma-typos-including-tensorflow-and-pytorch-sentry-and-v8-7bc3ad9a1bb7). Python did [consider removing support for adjacent strings](https://www.python.org/dev/peps/pep-3126/)...

> Is there a benefit other than "avoiding potential mistake" for this? Because if formatting the code makes the issue obvious, I don't like this proposal. It would potentially make...

> 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...

I've got a pitch for this as part of [this large overhaul of the pattern syntax](https://github.com/dart-lang/language/pull/2338). The rule is that you can omit the field name (but write the `:`)...