Bob Nystrom

Results 973 comments of Bob Nystrom

> I don't fully understand the topic, but isn't `noSuchMethod`'s purpose to be a catch-all for members of the implemented class that aren't explicitly declared by the implementing class? I.e.,...

I'm not sold on this. If an API returns a value of type `dynamic`, I *don't* want users taking the result of that and storing it in a variable explicitly...

> It's certainly something I can imagine myself using in various ways. Can you give me a use case? It feels pretty strange to me to have a structural type...

Do we *want* people to write code like that? Using a typedef to create what sort of behaves like a nominal type but is actually just an unspeakable structural type...

> Hmm. This seems to me to largely be a matter of taste. That is partially what users are asking us to do with the language. Part of language design...

Maybe the shorter answer I could have written is: It seems fundamentally confusing to me to have records that you can't pattern match on, and that's exactly what you get...

> I think also expanding the set of public fields is non-breaking, assuming the record also has at least one private field. Right? Right. Once a record has a single...

> > At that point, adding a public field to a record with a private field is no longer non-breaking > > I didn't follow this, can you expand on...

> This requires extra design in the web compilers which use a string-heavy representation of many things in the type system, including the expression of any type. @leafpetersen @eernstg @lrhn,...

> Do we need to introduce the notion of 'constant patterns', and use them for things like "`const P = e;` is a compile-time error unless P is a constant...