4 ms·
> Other ways to think about it: Just because Java standard library has a generic List -> LinkedList or ArrayList etc..., doesn't mean your software related to
by zwieback 3y ago
> Other ways to think about it: Just because Java standard library has a generic List -> LinkedList or ArrayList etc..., doesn't mean your software related to
> managing Patients does NOT mean you need this complication:
> Human <- BillablePerson <- Patient (this is somewhat whacky).
Also: class hierarchies don't have to match real-life hierarchies. Often I find it more useful to implement hierarchies that make the program flow and algorithms work more smoothly and accept hierarchies that don't mirror anything in the physical world.
- bccdee 3y agoYeah I think people get far too carried away with object ontology. You shouldn't be thinking of program objects as direct analogues for real-world things. At most, they're data which describes a real-world object, and like all data, you can arrange it however is most convenient. Normalize it, denormalize it, version it and make it immutable—whatever suits your needs best.