Most programmers use enums just so they can enforce a predefined set of options from which users can chose. However, enums have one major disadvantage: they can only hold one value at a time. Let’s say we have the following code:
In this case, specifying that we want to have a direction towards left seems OK.… Read more