Wow.  I have occasionally been accused of using obscure, "unmaintainable" code 
in the name of efficiency, but that "gubbins" example and Rob's default 
parameter assignment parse make me look positively conservative.

Bravo!  And thanks for showing us interesting concepts (assembler or not, I 
think concepts are not OT).

Peter

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of Rob van der Heij
Sent: Thursday, October 24, 2013 2:41 AM
To: [email protected]
Subject: Re: signum

On 24 October 2013 02:42, Tony Harminc <[email protected]> wrote:

On 23 October 2013 19:43, Paul Gilmartin <[email protected]> wrote:
> > I have occasionally gotten
> > flamboyant and coded such as:
> >
> >     X = copies( 'gubbins', A==B )  /* instead of:  */
> >
> >     if A==B
> >         then X = 'gubbins'
> >         else X = ''
>
> That's a very APLish thing to do.
>

I would be worried about (when the language permits it)    x =
copies('gubbins', c=a==b)

No doubt a matter of style and experience, but I find if/then/else hard to
follow when reading. Especially when ident does not match the nesting. Once
you're familiar with the idioms, they reduce the amount of reading and
increase what you can oversee on a single screen or page.

Reducing the vocabulary does not make a coded algorithm easier to
understand. I you have no clue about binary search, then following the
if/then/else with your finger may not help you spot an error. Knowing the
language is the least of your concerns.

A popular one we use is this:  return rc * (rc <> 12)
Or this (to assign defaults to missing arguments):
  parse value subword(outf,1,3) subword('BUNDLE VMFPLC A', words(outf)+1)
with outf

Rob (almost Friday)
--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

Reply via email to