39 ms·
Projects describing the real world. A car have a motor which have pistons. But can be a mess for inappropriate projects for sure.
by Instantix 2y ago
Projects describing the real world. A car have a motor which have pistons. But can be a mess for inappropriate projects for sure.
- loup-vaillant 2y ago> 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.