Open Eregerog opened 4 years ago
The idea behind the WithFoo
extension methods is to promote immutability, whereas the .Position
utility promotes simple modification. Adding these methods to VectorProxy
would return an immutable copy, potentially leading to bugs for people expecting to modify the state with this. On the other hand, having different semantics for the same method depending on which class it is called on is confusing as well.
For now I guess you'll be fine with writing bb.Position.x = bb.Position.x + 17
.
Because this:
does not compile