From Erights

Revision as of 05:00, 8 November 2008 by Kevin Reid (Talk)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

A Slot is an object which provides the behavior of the binding of a noun. "&" in the E language allows working with slots.

A slot can also be considered a zero-dimensional collection, i.e. one which has exactly one element.


Notable implementations



Signature: get() :any

Returns the current value of this slot.


Signature: put(newValue :any) :void

Sets the current value to the (possibly coerced) provided value, if appropriate for this type of slot; throws if not allowed.


Signature: isFinal() :boolean

Says whether the Slot acts like a FinalSlot -- successive get()s on the same slot will always give the same value.

Note that final implies read-only, but read-only does not imply final.


Signature: readOnly() :Slot

Returns a facet allowing get/0 but not put/1.

Personal tools
more tools