Menu

#795 Stem class, add defaultValue and stemName attributes

None
unread
nobody
None
none
1
2021-09-03
2021-09-03
No

In a current discussion on the new RexxLA list about using the stem class it has turned out to be quite difficult to understand the relationships with classic Rexx stems, namely the stem's name (can be optionally supplied as an argument to new) and the default value (can be set with []= and queried with [] which classic Rexx programmers won't be able to relate to).

If instead two attributes would be defined and documented, this would be clear for them and easy to apply, hence requesting the following two attributes:
stemName: allows to get current stem name and change it
defaultValue: getter and setter with the same semantics as [] and []=

Related

Feature Requests: #795

Discussion

  • taf

    taf - 2021-09-03

    +1 (Thanks, Rony)

    On 2021-09-03 05:30, Rony G. Flatscher wrote:


    [feature-requests:#795]
    https://sourceforge.net/p/oorexx/feature-requests/795/ Stem class,
    add defaultValue and stemName attributes

    Status: unread
    Milestone: None
    Created: Fri Sep 03, 2021 12:30 PM UTC by Rony G. Flatscher
    Last Updated: Fri Sep 03, 2021 12:30 PM UTC
    Owner: nobody

    In a current discussion on the new RexxLA list about using the stem
    class it has turned out to be quite difficult to understand the
    relationships with classic Rexx stems, namely the stem's name (can be
    optionally supplied as an argument to new) and the default value (can
    be set with []= and queried with [] which classic Rexx programmers
    won't be able to relate to).

    If instead two attributes would be defined and documented, this would
    be clear for them and easy to apply, hence requesting the following
    two attributes:
    /stemName: allows to get current stem name and change it
    / defaultValue: getter and setter with the same semantics as [] and []=


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/oorexx/feature-requests/795/
    https://sourceforge.net/p/oorexx/feature-requests/795/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Feature Requests: #795

  • Rick McGuire

    Rick McGuire - 2021-09-03

    defaultValue already exists via the [] operator.

    a. = 1
    say a.[] -- displays "1"

     
    • Rony G. Flatscher

      Yes, it exists.

      The RFE aims at making it easy for classic Rexx programmers to deal with stem objects (and maybe also students who are about to learn programming with ooRexx).

      The [] and []= as well as being able to use a.[1] instead of a.1 look very "alienating" to them (it takes a while to get accustomed to).
      If however they see an attribute "stemName" and "defaultValue" it will be an easier to understand idiom for them. It would be meant that the attributes would be added, but not to replace the existing behavior of [] and []=.

      (And also maybe for the ooRexx acquanted: I had to research quite a bit to find out in the documentation about [] and []=, but I was almost certain, that it was impossible that you would have overlooked the need to get and set default values! o I kept looking until I found them. :) )

       

Anonymous
Anonymous

Add attachments
Cancel