Quote:Original post by SamLowry
You should use Eiffel, where nullary methods and properties are one and the same if I'm not mistaken.
Quote:From a performance perspective, something of the form: Vector.Normalize(ref v, out result); is even better.
Why is that? Or do you assume Vector is a value type? Is it also more efficient if Vector is a class?
If it's not a value type then someone screwed up horribly. As a non-value type, a 4-vector consumes 16 bytes + 8 (or 16 in x64) memory per allocation. That's extremely tiny for a reference type, and seeing as how in general where you need on vector, you need many vectors, an array of them will scatter your vectors all over memory, not to mention, temporary allocations for mathematics will fill up the GC forcing more collections and promoting just slightly longer lived items to the next generation.