You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, each Item has a kind associated with it, via getItemKind. This works, and we use it in e.g. the data access layer, but it seems like a bit of an open/closed problem: adding new types needs to modify this enum, so it isn't really open or closed.
This could maybe be 'fixed' by using instanceof, although that just kicks the problem to the using code. While we probably can't erase the problem entirely, doing that might help at least make it more obvious.
The text was updated successfully, but these errors were encountered:
Right now, each Item has a kind associated with it, via
getItemKind
. This works, and we use it in e.g. the data access layer, but it seems like a bit of an open/closed problem: adding new types needs to modify this enum, so it isn't really open or closed.This could maybe be 'fixed' by using
instanceof
, although that just kicks the problem to the using code. While we probably can't erase the problem entirely, doing that might help at least make it more obvious.The text was updated successfully, but these errors were encountered: