[Jprogramming] i. (2 2 $ 1 2 3 4)

Henry Rich henryhrich at gmail.com
Sat Dec 16 01:05:18 UTC 2017


The current behavior was designed to make sure that

    5 + ''
5

doesn't throw an error.  This is a 55-year-old APL idiom.

Henry Rich

On 12/15/2017 7:03 PM, Raul Miller wrote:
> I've been thinking about this, and I am slightly convinced.
>
> That said, I would be interested in seeing a real example where this matters.
>
> Specifically: in this example you are getting an empty noun with a
> rank lower than what you should otherwise expect.
>
> That suggests one of two likely treatments:
>
> (a) The unintended shape causes an error.
>
> (b) The unintended shape gets treated as an empty result.
>
> (If the programmer has been coding defensively (which is to say not
> expecting deep understanding of the mechanisms of connected
> components) then I do not see how your proposal changes the picture.)
>
> It could of course - but that's why I'd like to see a real example.
>
> (Of course, none of this is an excuse for not testing code against
> boundary conditions.)
>
> Thanks,
>


---
This email has been checked for viruses by AVG.
http://www.avg.com



More information about the Programming mailing list