67 points · by jesseduffield · 5y ago · 19 comments
Data-Oriented Design (2018) - https://news.ycombinator.com/item?id=20380397 - July 2019 (37 comments)
Data-Oriented Design (2013) - https://news.ycombinator.com/item?id=11064762 - Feb 2016 (8 comments)
Data-oriented design or why you might shoot yourself in the foot with OOP (2009) - https://news.ycombinator.com/item?id=27658706 - June 2021 (362 comments)
I understand the main point that data is everything, but the author's arguments are hard to learn and go over my head.
The wording makes it seem like they are criticizing objects because encapsulation makes the contained data less reusable. Well… that’s the whole point of encapsulation. I think the author is trying to say some things and it’s just not coming through as clearly as they intended
Somewhere in this triangle of worlds, there is a optimum of speed, debug and reason ability and beautiful code with minimal repetition..
One of the advantages of a language like Erlang is that it mandates immutable data, and can both optimize for that and give the developer an easier time reasoning about where changes can and can’t occur.
Python teases with its newer functional features, but any time you pass a data structure off to code outside your control you have no guarantees about what will happen to it.
Isn't that just the keyword "const" in C++? Its not perfect but if you need const the keyword really helps ensuring you 'pass' the const concept all the way down your data to its roots.
You can also have immutable data in Java. Instead of implementing both "setFoo" and "getFoo", you simply implement "getFoo".
Without specificity, the merits of the design are not falsifiable.