4 ms·
> Then in the next assignment the simple three-element tuple representing an RGB color is replaced by a class with getters and setters and multiple constructors
by tomlu 14y ago
> Then in the next assignment the simple three-element tuple representing an RGB color is replaced by a class with getters and setters and multiple constructors and--most critically--a lot more code.
How about using a simple struct/record? Not too much boilerplate, and if you're using a statically typed language it can be nice to at least give these things a type to help you out.