Timeline for Is it bad practice to check object types with an identifying member variable?
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 14, 2013 at 21:28 | comment | added | ddyer | sometimes it's the best choice, especially if the behavior is not strictly linked to the class. There's definitely tension between defining behavior by class inheritance verses other means. | |
| Oct 14, 2013 at 21:26 | comment | added | Thomas Eding | I had no idea default could be placed at the head and work, that's interesting. | |
| Oct 14, 2013 at 20:05 | comment | added | Atuos | I will implement your suggestion, but it doesn't really answer my question directly. Should I infer that you see it as OK design to check an object's type through a member variable? | |
| Oct 14, 2013 at 19:54 | history | answered | ddyer | CC BY-SA 3.0 |