This sort of comes from SmallTalk, where methods declare the local variables and all other variables are object variables. ooRexx uses the opposite approach, where object variables must be specified using EXPOSE and all other variables are local. For some methods, like INIT methods, it would be nice to use the opposite approach. For example, in an init method that initializes a number of attributes, one needs to make the decision between listing a large set of variables on expose vs. using the slower self~attributeName assignment forms. It would be nice if there were a mechanism that allowed everything to default to object variables. The USE instruction might work well for this since the operation is keyword based and it was always intended to be a multi-purpose instruction.
::method init
USE LOCAL x y z
The variable list should be optional to specify that everything is an object variable.
::method init
use local -- everything is an object variable.
Anonymous
Code committed revision [r10795].
Tests committed revision [r10798]
Related
Commit: [r10795]
Commit: [r10798]
Committed revision [r10919].
Related
Commit: [r10919]