2 ms·
There's no reason that you would need to freeze anything but the state. Things like classes represent the function associated with that state. I'd generally say
by bascule 14y ago
There's no reason that you would need to freeze anything but the state. Things like classes represent the function associated with that state. I'd generally say runtime modifications to the class hierarchy are BAD BAD BAD and you should never do them and you should feel bad when you do them, but that's a separate concern from concurrent state mutation. Detractors of OOP might wave their hands and say OOP colludes function and state, but really they're cleanly separated: it's the difference between (meta)class and instance.
Concurrent languages like Erlang allow you to swap function at runtime even though they're mutable state.