On Wednesday, 8 November 2017 at 17:38:27 UTC, Timoses wrote:
Are there better options/ways of achieving this?
What are you actually trying to achieve? What are you using these variables for?
My first thought is you should abandon the variable approach and just use an abstract function that returns the value for each child via overriding. It won't be static, but it also won't take any per-instance memory.