On 5/9/16, 9:31 AM, "Josh Tynjala" <joshtynj...@gmail.com> wrote:
>You may find that defining constants on the class that uses them doesn't >scale well, especially with UI components. That's something I found in >Feathers. > >If you or someone else creates a subclass, what to do with any constants >on >the base class? Should they get duplicated in the subclass? Or will users >be forced to look up the class hierarchy to figure out where to find a >constant? Both approaches have downsides. In Feathers, I ended up >duplicating the constants because I saw people getting confused about >where >to find them. Then, I found myself occasionally forgetting to duplicate >some constants when I created subclasses, and things just became messy and >potentially even more confusing. Good point about subclasses. Still, having centralized classes of event constants causes String table bloat. I wonder how much trouble we would cause if the taught the compiler to search up the class hierarchy for constants? Thoughts? -Alex