Enforced immutability: Difference between revisions

m
Line 526:
- Of course, constants can't have a mutable value.
 
- Functions or methods have access only access to its parameters, to the data stack and to global immutable objects : they can't update something global which could have a side effectused intoby another function.
 
Oforth allows mutable objects but they remain local to a task and are not visible by other tasks : there is no need to synchronise tasks. Channels are the only way for tasks to communicate and mutable objects can't be sent into a channel.
1,015

edits