Defending the ternary operator

Alex Martelli aleax at aleax.it
Sat Feb 8 18:42:27 CET 2003


Andrew Koenig wrote:
   ...
> Once you do know what they mean, APL programs are often much easier
> to understand than their counterparts in other languages.

Having written many prototypes in APL (starting with my Thesis,
then when I was working in IBM Research), later recoding them
in Fortran, I must say that such understandability was not my
experience.  I presumably did "know what they mean", as I had
originally coded them myself -- and as long as I was deeply
immersed in developing the APL code, my productivity with it
was quite good.  But, going back to a working APL prototype I
had coded a few weeks or months earlier, and understanding it
thoroughly so I could code the Fortran equivalent, was NOT an
easy task at all for me.

That was 20 to 25 years ago, so maybe I was just being "too
clever by half" in the APL-coding part, to my detriment.  But
I think the language does matter; partly because when I moved
to coding prototypes in REXX instead (before it acquired the
second 'X', when it was still an IBM internal-use thingy), I
found the "understanding and recoding" task much easier -- and
that wasn't due to the simple passage of time, because later
yet, having left IBM, when the "prototyping language" I would
typically use became Perl, then AGAIN "understanding and
recoding" became harder for me.

Funny enough, it seems I find prototype programs I coded in
languages typically considered to produce easily understandable
programs (such as REXX) to be easy to understand, while, when I
use for the same prototyping tasks languages typically considered 
to produce hard-to-understand programs (such as APL or Perl),
then I have a harder time understanding my own code later...;-).


Alex






More information about the Python-list mailing list