Is it possible to reference a variable with a string and an int?

This is an anti-pattern I call the Poor Man’s Array. The better way to do this is to use a proper collection like an array instead of a bunch of variables that are secretly related. Done right, the code with an array will usually be a lot shorter and cleaner too.

Leave a Comment