Enforced immutability: Difference between revisions
m
→{{header|Oforth}}
Line 526:
- Of course, constants can't have a mutable value.
- Functions or methods have
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.
|