Allow storing abstract object references in members #82
Labels
proposal
pending discussion about something to do
specification
involves the nyan language specification
nyan object members and sets with nyan object set types only allow non-abstract objects by default. This limitation is meant to ensure that when retrieving the object, all members are guaranteed to have values assigned. Costly checking for an uninitialized member is not necessary then.
However, it sometimes makes sense to still reference abstract objects, e.g. when the object reference is used for a type check where the member values are not needed. For this case we can use a type modifier
abstract(type)
. For containers, this feature can be used in combination with thehierarchy_overwrite
feature (see #37) to add and replace objects in an inheritance hierarchy.The text was updated successfully, but these errors were encountered: