In my last post I showed the Visitor design pattern in its fully object oriented implementation. In the post before that I wrote about moving from enums to class hierarchies. I […]
If you have read the “Gang of Four” book about design patterns or just have been long enough in software development, you will have heard of the Visitor pattern. In its fully […]
When an enum controls the behavior of a class, that behavior can sometimes be expressed by class hierarchies.
Sometimes, a fixed set of string values is allowed as input. Often these string values are then stored, used for control flow etc. Enumerators are a better alternative.