Aliasing syntax =============== There are two types of aliasing: 1. items that alias *something*, so reads/writes need to be done in order with regard to external or other accesses to aliased items. 2. items that alias a specific other item. This is useful for shallow copy functions, for example. Syntax for case 1: - simply a qualifier - this probably only makes sense when there are function pointers inside an object, that may modify the object. func f(aliased Obj a) func g(Thing b) -> aliased Obj # Does it make sense at all for return values? Syntax for case 2: - could work similar to lifetime specifiers: func f(Obj a, Obj b) aliasing a, b func g(Obj a) -> Obj aliasing a, return - which separator token to use? aliasing a, b aliasing a & b aliasing a/b aliasing a+b aliasing a b Simplified solution ------------------- * Disallow the "aliased" qualifier, and only use "aliasing" specifiers. * Regarding internal aliasing: - Do we need to specify it at all? The struct would have aliasing specifiers inside it anyway. - If yes, which syntax to use: - "aliasing internal a"? - or specify which fields? "aliasing a.f1, a.f2"