News for hackers. Stuff that matters.
Re:Principles of Data Oriented Programming by ajuc on Monday October 05, 2020 @02:33PM (#24690561)
You realize data is immutable when you first try to implement history.

Mutability is just a hack to save some memory.

Re:Principles of Data Oriented Programming by zmmmmm on Monday October 05, 2020 @09:07PM (#24693837)
I think when you start pulling on that string you eventually end up at event sourcing because once you are keeping comprehensive immutable history of all your changes keeping the mutable record anywhere just starts to look like a liability.
Re:Principles of Data Oriented Programming by pyrale on Tuesday October 06, 2020 @07:04AM (#24696484)
Yes, and it is incredibly comfortable to work in a properly tooled event-sourced codebase.
Re:Principles of Data Oriented Programming by talaketu on Monday October 05, 2020 @07:25PM (#24693163)
> just a hack to save some memory

.. and time. If we needed to compute an account balance by summing all the debits and credits since the account was opened...

Re:Principles of Data Oriented Programming by simongray on Tuesday October 06, 2020 @04:45AM (#24695824)
Persistent data structures already solved this issue.
Re:Principles of Data Oriented Programming by pyrale on Tuesday October 06, 2020 @07:03AM (#24696472)
You don't need mutability to save on time, you just need to use referential transparency effectively when calculating your projections.