top | item 39924161

(no title)

hasty_pudding | 1 year ago

What they mean is functions and data are separate, emulating a more functional paradigm and less mutable state.

The functions are kept pure and the data is kept pure.

As opposed to an object oriented programming style in which data and functions share the same object and create bug ridden state machines thats not as easy to reason about.

Some further explanation about this:

https://www.goodreads.com/quotes/702062-immutable-objects-ar...

a semi-nuanced discussion:

https://www.reddit.com/r/scala/comments/ejwsp1/is_mutability...

you can just Google mutable state to find more info.

separating your data structures and functions in many cases will make your code cleaner and more bug free.

discuss

order

recursive|1 year ago

I'm well aware of the pros and cons of mutability. I object (hah!) to this novel new use of the word "object". The concept is well defined by the ECMAScript spec.

Your first link's first sentence's first two words are "Immutable objects". No problem there. It doesn't conflate objects with mutability.

hasty_pudding|1 year ago

you know how unsufferable it is when people bog a conversation down with semantics instead of ideas.

the point is obvious.

Being that every single language on Earth uses objects for non-primitive data structures that should be inferrable to a reasonable person.

a data structure in that context is clearly an ordered grouping of objects versus an unordered/loose grouping of objects.