4 ms·
> everything is an object Well, if we're talking Java, not everything is an object. None of the primitive types are, and Java has static methods. > Just like
by wtetzner 11y ago
> everything is an object
Well, if we're talking Java, not everything is an object. None of the primitive types are, and Java has static methods.
> Just like a cashier doesn't reach into a Person's brain for their debit code. The cashier asks them to type it into the keypad, and points them where to do it if it isn't obvious.
OK, so I picked a bad example. What if you're dealing with records of tree data? Are you suggesting that modelling the domain means that trees should know what to do with the information about their diameter? In what way is that modelling a domain?
In software we're rarely writing simulations of the real world, and even then, it doesn't always make sense to have objects hide information that other agents could just observe about them.
We're usually dealing with information, not actors.