News for hackers. Stuff that matters.
Re:Principles of Data Oriented Programming by wiremine on Monday October 05, 2020 @01:55PM (#24690190)
> Immutability is a very useful tool since you have have any kind of dependency -- direct, indirect, implied, etc) -- and there's no worry. But you still need a mechanism to manage mutating data.

I agree. For me it feels like immutable data is a tool, not a universal principle. For example, in low-level C programming or direct control of a register in an embedded context, immutable data isn't a principle, it's just another approach.

What I mean by "universal" is something like SOLID. [1] (Most people only use SOLID for OOP, but Uncle Bob makes it clear in Clean Architecture that he thinks SOLID is universal, and not limited to OOP.)

That said: it does feel like immutable data should be the _default_ approach in many situations. But that's really hard to do in most languages.

[1] https://www.amazon.com/Clean-Architecture-Craftsmans-Softwar...

There are no comments on this comment yet.