On Tue, 23 Apr 2024 14:07:05 +0000, Schmitt, Michael wrote:

>You lost me when you say that rather than embrace the conventions, standards, 
>and features of the language I'm coding in (REXX), I should restrict it to the 
>limitations of other languages.
>
Did I say that?  I was trying to take a middle ground.

>The maxim is to assume that readers of your code are familiar with the 
>language you're coding in, and would expect your code to follow those 
>conventions. It would /defy/ their expectations to code otherwise.
>
Be sparse and elegant but not rococo.  I prefer:
    'A' B
to (the equivalent):
    'A ' || B
The latter seems to cater to the expectations of PL/I or some other language.

But I confess to an obsession with performance.  Function call/return is
costly, so I'll use:
    PARSE VAR A . . X .
rather than (the sparser?):
    X = SUBWORD( A, 3 )


>-----Original Message-----
>From: Paul Gilmartin
>Sent: Monday, April 22, 2024 8:56 PM
>To: [email protected]
>
>On Tue, 23 Apr 2024 10:59:47 +1000, Andrew Rowley  wrote:
>>    ...
>>To me, it is much clearer to be explicit, including the concatenation, e.g.
>>"DELETE " || foo
>>seems much clearer about exactly what is happening/expected, which are
>>variables and which are (expected to be) constant etc.
>>
>That overkill is apt to confuse a POSIX shell partisan who would
>see the blank as part of the command name and expect a
>failure such as:
>    813 $ 'rm ' foo
>    -bash: rm : command not found
>    814 $
>
>The maxim is assume your readers have a moderate, not
>advanced, knowledge of the language and make little
>concession to conventions of other languages.  Don't:
>    'DELETE' || ' ' || value( 'foo' )
>
>My stumbling block learning Shell was excessive familiarity
>with CMS, where command strings built by Rexx  are parsed
>again by SVC 202.  I tried to build command strings with sh
>to pass to a nonexistent subsequent parser.  I got better in
>a couple days.

-- 
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to