var - read-write allowed writeonly - only writing allowed uninit - uninitialized, may be passed around or fully initialized (and then passed around as non-uninit) shared - without specifier, it means that the data may be modified at any time [actually, we need three "shared" keywords, one for "modified by others" and one for "read by others" and one for both] - rshared ("writeonly shared" would be implicitly rshared) - wshared (non-var "shared" would be implicitly wshared) - rwshared ref - pointer, may not be null mergeref - pointer (non-null), or any data that fits in a pointer (arch specific) ownref - without specifier, it means that we "own" this data uninit ------ def: the data is completely uninitialized (may not be read from) - it is meaningful on reference targets only (or should it also be allowed for e.g. random data) - for refs in parameters, it means that it comes in as uninitialized - for refs in return values, it means that it is returned as uninitialized - for variable refs it means that it comes in as uninitialized, how to tell the compiler when it should be ready? maybe a special "initialized X" statement? changes: if all code paths write to all data (in the current typestate) in the type, it loses the "uninit" qualifier at that point - but we want to have length-capacity-buffer arrays! -- can we overlay two types with a union? -- special handling for this case? -- other solutions? shared (without specifier) ------ TODO shared(...) ----------- TODO mergeref -------- TODO ownref (without specifier) ------ def: At the end of all code paths (all possible function exit locations), the ref must have been passed to exactly one function as an "ownref" parameter, returned, or stored in one global variable (but not mulitple of those). combinations: - "[write-]shared ownref" is probably a bad idea, but "shared ?ownref" can work. ownref(...) ----------- TODO