Notes
just some development notes...
- Add the ability to make a variable or pointer const based on access privilege.
- Constructors (besides primitives) do not evaluate into a value, instead they act upon the storage location where the result would end up. Basically taking a result pointer. This also allows return value optimisation / copy elision because the address of the result value is passed into functions (implicitly, by the compiler).
INLINE
functions are skipped in error traces (unless an error is produced inside one). The skipped functions are given afterwards as an extended tracing aid. They also should not appear in debugging stacktraces, so that they effectively remain hidden, as they should only be containing trivial / glue code.- Function arguments and temporaries have a
LOCAL
andARGUMENT
context that denotes their lifetime. So when constructing a temporary instance as#&
argument, it has the typeT {ARGUMENT} #& {LOCAL}
, and a copy would haveT {LOCAL}
. AnARGUMENT
lives until after the function returns, and references to it may be returned from a function, butLOCAL
values are destroyed before returning. A returned value also has theARGUMENT
scope and is allocated before the function is executed. BothARGUMENT
andLOCAL
scoped values do not have an address, so no pointers can point towards them (for optimisation purposes). - Operator expression statements (except assignments to a
BOOL
) that result in aBOOL
are automatically converted intoASSERT
statements (such asx > 5;
). Expression statements that have a post-fix!
(value of) as their outer-most operator are implicitly converted toBOOL
and then into anASSERT
statement (such asBoolConvertibleExpression!;
.