Formal proposals for changes to the code, new libraries, etc.
The meta-programming type, allowing you to make a new type based on an existing type.
meta TYPE NEW_TYPE {
# keys...
}
TYPE must be an existing type and NEW_TYPE must be orthographically valid for a type name and must not be the same as TYPE.
meta types explicitely do not export or import anything where they are in the structure and effectively have no siblings.
There are three suggestions for accessing the data passed to the constructor:
@this.data
, this means data: @this.data
would always be necessary if the data was intended to be passed through. Additionally data is a concept for value types, not all types.@basic
, a new special reference just for this@{}
pointing at an empty substruct, which is normally invalidFollowing examples will use @{}
to stand out.
meta list intlist {
type: number { size: 4 }
length: @{}
}
Then this can be used in something such as:
intlist(8)
To pull out a list of 8 uint_32s
meta string strip {
{
bin: @{}[0].bin
padside: both
padding: @{SyncEncoding}.padding.bin
}
encoding: @{}[0].encoding
static SyncEncoding {
padding: @{}[1]
}
}
This structure will strip some character sequence from a string by abusing the padding decoder; i.e. strip["##abc#", "#"]
is equal to "abc"
@parent
refers to the parent of where the meta struct is defined and not where it’s used. @back
could possibly refer to where it was used.x(0)
vs x[0,1]
.