no, they still suck semantically, they're useless, you aren't protecting anything if you have a setter, all the problem is immutability, you have to control mutability, not access
That's not really true. Immutability has its positives, but in environments where that is undesirable (either for performance or design reasons--while I quite like writing immutable code I recognize that there are plenty of places where it makes for a more complicated model, just look at common rom-rb usage patterns) setters allow for explicit filtering, bounds and range checking, and reactivity (property changes firing on an event bus, for example). You may not need any of those right away. And that's totally fine. But setters provide a forward-compatible API for having them later, while being trivially inlined away.
Amazing, thank you
"execution flow is relative" my mind is blown lol
only data-flow matter ! execution-flow is an illusion
The same here.
every time you needed to touch disk - you sucked. epic!
I agree.
getters and setters just suck as much as cache misses
no, they still suck semantically, they're useless, you aren't protecting anything if you have a setter, all the problem is immutability, you have to control mutability, not access
That's not really true. Immutability has its positives, but in environments where that is undesirable (either for performance or design reasons--while I quite like writing immutable code I recognize that there are plenty of places where it makes for a more complicated model, just look at common rom-rb usage patterns) setters allow for explicit filtering, bounds and range checking, and reactivity (property changes firing on an event bus, for example).
You may not need any of those right away. And that's totally fine. But setters provide a forward-compatible API for having them later, while being trivially inlined away.
the real problem is sharing state, not having compatibility, it's never a good idea to be forward-compatible by sharing state
Forward compatibility is unrelated to the sharing of state.