Hacker News new | ask | show | jobs
by colanderman 963 days ago
Instead of integers you could use symmetric model values which you map to integers in a separate dedicated variable. Then it's easier to find the values in the other variables, and you don't have to mutate those other variables. (It's still hard to find them in e.g. the body of a function with infinite domain.)

(Of course with model values you must allocate them ahead of time. And with symmetry, the practical limit is 3-5 such values.)