Proposed Additional meaning of the hyphen in NetRexx

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Proposed Additional meaning of the hyphen in NetRexx

Thomas.Schneider.Wien
Hello there,
    I also would like to suggest to give the HYPHEN an additional
meaning in NetRexx.

    In summary, the HYPHEN is currently used in 3 meanings:

- representing a minus (for arithmetic operations)
- representing the continuation character at the (premature) end of an
instruction
- representing the start of a Line Comment (I call those Note's) when
doubled

My proposition is as follows:

If the verb 'end' is used (as the first token of an instruction), it
might be
immediately followed by a single hyphen (as the immediate next token)

If this is so, the following verb designates 'what is ended'. This might
be either
the name of the current method, or class, or one of the instruction
keywords,
e.g.

    if abc='xy' then do
<instructions>
    end-if

simliar:

    select case abc
       when 'a', 'b' then do
<instructions>
       end-when
       when 'c' then <instruction>
       ...
    end-select   (or even: end-select case abc)

What do you say ?
Thomas.


--
Thomas Schneider Projects PP, ReyC, and LOGOS on www.KENAI.com
www.thsitc.com
_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Tom. (ths@db-123.com)
Reply | Threaded
Open this post in threaded view
|

Re: Proposed Additional meaning of the hyphen in NetRexx

George Hovey-2
Could you explain what benefit you see accruing from this proposal?

On Thu, Nov 25, 2010 at 3:58 PM, Thomas Schneider <[hidden email]> wrote:
Hello there,
  I also would like to suggest to give the HYPHEN an additional meaning in NetRexx.

  In summary, the HYPHEN is currently used in 3 meanings:

- representing a minus (for arithmetic operations)
- representing the continuation character at the (premature) end of an instruction
- representing the start of a Line Comment (I call those Note's) when doubled

My proposition is as follows:

If the verb 'end' is used (as the first token of an instruction), it might be
immediately followed by a single hyphen (as the immediate next token)

If this is so, the following verb designates 'what is ended'. This might be either
the name of the current method, or class, or one of the instruction keywords,
e.g.

  if abc='xy' then do
<instructions>
  end-if

simliar:

  select case abc
     when 'a', 'b' then do
<instructions>
     end-when
     when 'c' then <instruction>
     ...
  end-select   (or even: end-select case abc)

What do you say ?
Thomas.


--
Thomas Schneider Projects PP, ReyC, and LOGOS on www.KENAI.com www.thsitc.com
_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Proposed Additional meaning of the hyphen in NetRexx

measel
In reply to this post by Thomas.Schneider.Wien
Say N[o] + 1


From: [hidden email] <[hidden email]>
To: [hidden email] <[hidden email]>; IBM Netrexx <[hidden email]>
Sent: Fri Nov 26 02:39:11 2010
Subject: Re: [Ibm-netrexx] Proposed Additional meaning of the hyphen in NetRexx

Could you explain what benefit you see accruing from this proposal?

On Thu, Nov 25, 2010 at 3:58 PM, Thomas Schneider <[hidden email]> wrote:
Hello there,
  I also would like to suggest to give the HYPHEN an additional meaning in NetRexx.

  In summary, the HYPHEN is currently used in 3 meanings:

- representing a minus (for arithmetic operations)
- representing the continuation character at the (premature) end of an instruction
- representing the start of a Line Comment (I call those Note's) when doubled

My proposition is as follows:

If the verb 'end' is used (as the first token of an instruction), it might be
immediately followed by a single hyphen (as the immediate next token)

If this is so, the following verb designates 'what is ended'. This might be either
the name of the current method, or class, or one of the instruction keywords,
e.g.

  if abc='xy' then do
<instructions>
  end-if

simliar:

  select case abc
     when 'a', 'b' then do
<instructions>
     end-when
     when 'c' then <instruction>
     ...
  end-select   (or even: end-select case abc)

What do you say ?
Thomas.


--
Thomas Schneider Projects PP, ReyC, and LOGOS on www.KENAI.com www.thsitc.com
_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Proposed Additional meaning of the hyphen in NetRexx

alansam
In reply to this post by George Hovey-2
On Thursday, November 25, 2010, George Hovey <[hidden email]> wrote:
> Could you explain what benefit you see accruing from this proposal?
>

Other than making the language less Rexx-like; none.  I vote against.

Alan.

--
Can't tweet, won't tweet!
_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Alan

--
Needs more cowbell.
Reply | Threaded
Open this post in threaded view
|

Re: Proposed Additional meaning of the hyphen in NetRexx

Aviatrexx
In reply to this post by Thomas.Schneider.Wien
-∞

Unless I'm missing something, the reason for suggesting this is to
narrow the window of missing/extra 'end' clauses by directly
associating the 'end' with the keyword that started a multi-clause
statement.  While an admirable goal, this can already be done by the
NetRexx language processor:

   if abc='xy' then do label endif  --no, not the csh endif :-/
     <instructions>
   end endif

The programmer can code the optional 'label' phrase on 'do', 'select',
and 'loop' instructions.  Problem elegantly solved, and the capability
to 'leave' the construct prematurely is tossed in for free!

I am NOT in favor of making each multi-clause keyword instruction
terminate with a unique keyword.  Shades of Unix if-fi, case-esac :-P
and do-od/do-done abominations!

But it's possible that I'm missing something.  The first example

 >    if abc='xy' then do
 > <instructions>
 >    end-if

makes it appear that Thomas intends that such a construct would be
acting as a terminator for the 'if', not the 'do' clause.  If so,
would it still be necessary if there was only a single instruction
following the 'then'?  What if there was an 'else' clause with a
single instruction?  I would not be happy with

   if abc='xy' then say "same"
               else say "diff"
   end-if

for many reasons.

In the second example

 >    select case abc
 >       when 'a', 'b' then do
 > <instructions>
 >       end-when
 >       when 'c' then <instruction>
 >       ...
 >    end-select   (or even: end-select case abc)

it appears that Thomas is hellbent for leather to change NetRexx into
another language altogether.

The 'case' construct adds nothing to the 'select' clause, introduces a
lexical overloading of the comma, and (as above) the 'end-when' seems
to terminate the 'do', not the 'when' (if the omitted 'end-when' for
case 'c' is to be believed).

And again (as above) the 'end-select' functionality is already
available by use of the 'select label name' syntax.  How is his
example a significant improvement over

   select label endselect
     when abc = 'a' | abc = 'b' then do label aorb
       <instructions>
       end aorb
     when abc = 'c' then <instruction>
     when abc = 'd' ...
     otherwise do label nomatch
       <instructions>
       end nomatch
   end endselect --abc

in clarity, readability, or even Rexxishness?

-Chip-

On 11/25/10 20:58 Thomas Schneider said:

> Hello there,
>    I also would like to suggest to give the HYPHEN an additional meaning
> in NetRexx.
>
>    In summary, the HYPHEN is currently used in 3 meanings:
>
> - representing a minus (for arithmetic operations)
> - representing the continuation character at the (premature) end of an
> instruction
> - representing the start of a Line Comment (I call those Note's) when
> doubled
>
> My proposition is as follows:
>
> If the verb 'end' is used (as the first token of an instruction), it
> might be
> immediately followed by a single hyphen (as the immediate next token)
>
> If this is so, the following verb designates 'what is ended'. This might
> be either
> the name of the current method, or class, or one of the instruction
> keywords,
> e.g.
>
>    if abc='xy' then do
> <instructions>
>    end-if
>
> simliar:
>
>    select case abc
>       when 'a', 'b' then do
> <instructions>
>       end-when
>       when 'c' then <instruction>
>       ...
>    end-select   (or even: end-select case abc)
>
> What do you say ?
> Thomas.
>
>


_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Proposed Additional meaning of the hyphen in NetRexx

Tom Maynard
On 11/26/2010 2:34 PM, Chip Davis wrote:
-∞

Unless I'm missing something, the reason for suggesting this is to narrow the window of missing/extra 'end' clauses by directly associating the 'end' with the keyword that started a multi-clause statement.
While I am also not in favor of the proposed change, I do believe that Thomas did recommend it as an _optional_ usage.  If the NetRexx language permitted this usage, I would omit it -- but others might choose to adopt it.

That's my interpretation of his original statement (emphasis added):

My proposition is as follows:

If the verb 'end' is used (as the first token of an instruction), it might be
immediately followed by a single hyphen (as the immediate next token)


Tom.


_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Proposed Additional meaning of the hyphen in NetRexx

Thomas.Schneider.Wien
1.) First, thank you all for your comments up to now.
2.) Of course I did mean an OPTIONAL usage, NOT breaking any of the current NetRexx rules.
3.) As I'm currently in Process to convince COBOL and PL/I trained peoples
to use PP (The program porting machine) for porting their COBOL programs
to NetRexx, it would be just a 'convenient convention'for those guys. Actually,
Im currently simply generationg an end--if (double hyphen) and thought it might be a useful addition to the *human reading* of NetRexx.

I leave the decision open to the upcoming NetRexx language board.
Thomas Schneider.
==========================================================

Am 26.11.2010 22:55, schrieb Tom Maynard:
On 11/26/2010 2:34 PM, Chip Davis wrote:
-∞

Unless I'm missing something, the reason for suggesting this is to narrow the window of missing/extra 'end' clauses by directly associating the 'end' with the keyword that started a multi-clause statement.
While I am also not in favor of the proposed change, I do believe that Thomas did recommend it as an _optional_ usage.  If the NetRexx language permitted this usage, I would omit it -- but others might choose to adopt it.

That's my interpretation of his original statement (emphasis added):

My proposition is as follows:

If the verb 'end' is used (as the first token of an instruction), it might be
immediately followed by a single hyphen (as the immediate next token)


Tom.

_______________________________________________ Ibm-netrexx mailing list [hidden email]


--
Thomas Schneider Projects PP, ReyC, and LOGOS on www.KENAI.com www.thsitc.com

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Tom. (ths@db-123.com)