4 ms·
> Write extra code to ensure that you update area every time you change width or height? Unless I change width and height all the time, but only read the area
by PavlovsCat 8y ago
> Write extra code to ensure that you update area every time you change width or height?
Unless I change width and height all the time, but only read the area very rarely: of course, and gladly so, since I much prefer that to fetching two values and making a multiplication for what could be a simple fetch instead. And don't get me started on code that uses a getter on a value that doesn't change in a loop. I don't find that stuff "clean" at all. Don't just ask how it looks in the editor, ask what it makes the machine do.