Menu

#654 Add an instruction that is the inverse of EXPOSE

5.0.0
closed
Erich
None
none
1
2023-01-01
2014-10-29
No

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.

Discussion

  • Rick McGuire

    Rick McGuire - 2014-10-31

    Code committed revision [r10795].
    Tests committed revision [r10798]

     

    Related

    Commit: [r10795]
    Commit: [r10798]

  • Rick McGuire

    Rick McGuire - 2014-10-31
    • status: unread --> accepted
    • assigned_to: Rick McGuire
    • Pending work items: none --> doc
    • Milestone: None --> 5.0.0
     
  • Erich

    Erich - 2015-05-22

    Committed revision [r10919].

     

    Related

    Commit: [r10919]

  • Erich

    Erich - 2015-05-22
    • assigned_to: Rick McGuire --> Erich
    • Pending work items: doc --> none
     
  • Erich

    Erich - 2015-05-22
    • status: accepted --> closed
     
  • Erich

    Erich - 2015-05-22
    • status: closed --> pending
     
  • Rony G. Flatscher

    • Status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB