As you can see from my example, J does not normally disregard the error.
It disregards it when it happens in the handling of these empty array
cases. /Erling
On 2017-12-16 02:05, Henry Rich wrote:
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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm