Lasse R.H. Nielsen

Results 772 comments of Lasse R.H. Nielsen

Definite footgun. Take an object implementing `Iterable`. You then "override" `get iterator` and think you're clever. Calling any of the exposed instance members will *not* use the new `iterator` because...

I don't actually see why the "optimal code for efficiency" is any more efficient than the "optimal code for humans". The output from a moderately competent compiler should be indistinguishable....

Evaluation order matters, so the compiler will definitely evaluate `location` before `speed` and both before calling `Result`. In compilation, evaluation order is pretty much the *only* thing which matters, which...

Recalculating the value, which can possibly be an asynchronous computation, sounds very error-prone. If you want to just share the code, there is always functions: ```dart Location location() async =>...

If we allow modification of member variables of a struct, we effectively prohibit some variants of unboxing. Objects have consistent identity, and that identity is preserved across assignment. C++ structs...

Level 0 is probably sound. (I say probably because I can't find any reason it shouldn't be, but it's always possible to miss something. This is like security — you...

Changes to private members should only affect the library itself, so it's not breaking *unrelated* code (considering the entire library as related to itself). If we introduce the rules that...

I'd say yes. That only matters for whether the record can be used in a `const` expression, because records are already immutable and auto-canonicalizing (the way `identical` is defined on...

I've written up a proposal for constant record behavior (https://github.com/dart-lang/language/pull/2413). I've made some choices in there that might need discussion: 1. `(e1, e2)` is a constant expression iff `e1` and...

> I would expect the implicitly induced `operator ==` on record types to use identical to provide good performance based on pointer equality in the case where the receiver is...