Re:Value-Oriented Programming
by sirwhinesalot on Wednesday February 08, 2023 @09:04AM
(#34708131)
It's unfortunate that this idea shares a name with the somewhat unrelated Data Oriented Programming (focused on performance and cache utilization).
That said, I very much believe in the value of values. Data should have no associated behavior or have a "place" in memory, the place and the behaviour are secondary. That's why, ironically, "Manager" objects are the best type of object you can have, contrary to OO best practice, because they don't own the data, they just provide a place and behaviour for a particular usage.
The idea of "everything is a hash-map" is also possible in statically typed languages to some extent using row-polymorphic structural types. OCaml and Elm or Koka are great examples.
Anyway I thought it was sort of ironic that the idea is this good because it does the thing everyone tells you not to do (hashmap all the things), but now that someone has written a book on it you have at least the air of respectability.
[1] https://www.youtube.com/watch?v=Vz9rkr_p3Ts [2] https://www.manning.com/books/data-oriented-programming