Enforced immutability: Difference between revisions

Added Quackery.
(→‎{{header|Vlang}}: Rename "Vlang" in "V (Vlang)")
(Added Quackery.)
Line 948:
<syntaxhighlight lang="racket">(struct coordinate (x y)) ; immutable struct</syntaxhighlight>
mutable struct definitions need to explicitly use a <tt>#:mutable</tt>, keyword next to a field to specify it as mutable, or as an option to the whole struct to make all fields mutable.
 
=={{header|Quackery}}==
 
Quackery does not enforce immutability. The majority of Quackery is immutable by design; operators and numbers are immutable, and nests are immutable insomuch as the words in the nest editing wordset treat them as immutable.
 
Certain objects; the ancillary stacks, the system dictionaries, and tables are mutable of necessity, and have a specific set of words, the ancillary stacks wordset, dedicated to handling them. The words in this wordset can also be applied to nests if the programmer chooses to disregard the guidelines for their use provided in The Book of Quackery. In short, enforcement is eschewed in favour of relying on the programmer's good sense.
 
=={{header|Raku}}==
1,462

edits