Is it possible to mimic Enum's values() with seale...
# announcements
d
Is it possible to mimic Enum's values() with sealed classes so we can use resulting list (all subclasses) to access companion object/static properties/methods. Using reflection is ugly, more so from consumer side when we only want to access static data of the subclasses. What would be Design pattern to search for (that is solution irrelevant of the language)
j
sounds like you should aggregate an enum into a class with dynamic instances so you don't have to splain this to a maintainer.