Read-only slots
Factor handbook > The language > Objects > Tuples > Tuple slot declarations

Next:Slot class declarations


By default, all slots are writable. If a slot is explicitly declared read-only, then no writer method is generated for the slot, and the only way to set it to a value other than its initial value is to construct an instance of the tuple with boa, passing the initial value for the read-only slot on the stack; the common idiom of calling new and then immediately filling in slot values with setter words will not work with read-only slots.