Re:OOP is not that bad, actually
by Instantix on Thursday October 24, 2024 @11:39AM
(#41936636)
Projects describing the real world. A car have a motor which have pistons. But can be a mess for inappropriate projects for sure.
[ Parent
| on HN ]
Re:OOP is not that bad, actually
by loup-vaillant on Sunday October 27, 2024 @08:19AM
(#41962014)
> Projects describing the real world.
Yeah, one of the 3 big lies of computer programming: thinking that we should program around a model of the world. We should program around a model of the data that we need to transform to solve whatever problem we need to solve. Even in simulation software like games.
A car have a motor which have pistons. But why would I model that? To be honest Iām not sure OOP is appropriate even for CAD software here. Now maybe we could give the user the ability to make a mesh and call that "piston", an let them copy & paste that mesh to build a super-mesh they would call "motor", but this kind of composition is not quite OOP, and the appropriate way to program this stuff is probably not OOP either.