Bob Nystrom

Results 973 comments of Bob Nystrom

> We just had an issue ([dart-lang/sdk#49585](https://github.com/dart-lang/sdk/issues/49585)) about the performance of the current kind of switch statement. I'm not surprised that that issue relates to implementing a VM's instruction dispatcher....

> I believe that as specified, this program will print "hello" twice, and then break, since the semantics are defined to call equality in the other order: `o == a`...

Sorry, yes, there are a few things tangled up in this and a couple of mistakes on my part. ## Optimization Earlier, I said: > I believe so. I think...

> That is, I think it is arguably really sketchy as a language design that you can have a literal pattern which matches something which is in all shapes and...

Sorry for the long essay. See the summary at the end... My mental model for patterns is that whenever the pattern represents a constant value, regardless of syntax, the underlying...

> A problem with adding _any_ members to enums automatically, is that it blocks that name from being used as an enum element name. That's why I'm _very_ hesitant about...

> The String name is also not really a good way of serializing an Enum value, usually I would use the index. I mean, the string representation of a floating...

I hope this is the right place to post this. I've been thinking about the proposal and the discussion to generalize primary constructors to be allowed in classes too (#2364)....

> What I'd like to understand is why a polymorphic value type is needed, as it would always need to be boxed (therefore having reference semantics). `==` and `hashCode` are...

> I don't understand the argument against allowing this presented here. While it's certainly true that the "hidden" state makes them unequal... that's true of many things in Dart (e.g....