typed-objects-explainer
typed-objects-explainer copied to clipboard
Immutable fields
To support Wasm, we'll need some notion of an immutable field: once initialized it cannot be written.
A couple of obvious possibilities for how to denote an immutable field are:
- A new name / type property, eg, TypedObject.const_int32
- An attribute on an existing name / type property, eg, TypedObject.int32.const (JS syntax permitting)