News for hackers. Stuff that matters.
Re:“A closure is a poor man’s object; an object is a poor ma... by spdionis on Monday May 01, 2017 @09:46AM (#14237393)
Because objects are supposed to hide their internal state and the actions you do with them are heavily dependent on that state. This means that an object must have an identity to be sure you're working with the right object.

If you don't have identity it means that you must know yourself what state you're working with. This defeats the definition of objects that says that their state is hidden.

Re:“A closure is a poor man’s object; an object is a poor ma... by naasking on Monday May 01, 2017 @10:33AM (#14237711)
Encapsulation is not identity. Immutable objects are still perfectly encapsulated, but they don't have identity, which is what the OP was asking about.
Re:“A closure is a poor man’s object; an object is a poor ma... by lacampbell on Monday May 01, 2017 @05:45PM (#14241997)
I do come across the view a lot that immutable objects aren't really OO. It's something I really don't understand - state that changes over time doesn't seem like a key ingredient to me at all.