Content deleted Content added
Line 83:
where <code>pos</code> is an object with three properties <code>pos.x</code>, <code>pos.y</code> and <code>pos.z</code>. Then <code>pos</code> cannot be assigned to, but the three properties can, unless they are final themselves.
Like full [[immutability]], the use of final variables has great advantages, especially in optimization. For instance, <code>Sphere</code> will probably have a function returning its volume; knowing that its radius is constant allows us to [[Memoization|
Though it appears to violate the <code>final</code> principle, the following is a legal statement:
|