Note also that ‘’ {:: 0 works, and also the typical case left argument for
{:: might be a boxed list.

—
Raul

On Tuesday, September 18, 2018, Henry Rich <[email protected]> wrote:

> By all means put it on the list.
>
> You are selecting along 1 axis from an argument that has 0 axes, which
> makes the length error reasonable.
>
> The question is, why does 0 { 0 not fail?  Answer: because of the fine
> print in the definition.  (0 { y) selects item number 0, and an atom has a
> single item, itself.
>
> (<0) { 5   fails, rightly, for the same reason 0 {:: 5 fails.
>
> It is important to get these edge cases right, and there's most often only
> one right way, so my assumption is that Roger did it the right way.  I'll
> have to think it over.
>
> Henry Rich
>
>
>
> On 9/18/2018 8:05 PM, 'Pascal Jasmin' via Programming wrote:
>
>> I can add to request list.
>>
>> The argument for is that it is a source of "needless" errors.  The error
>> applies also if there is a nested box structure, but the top level is an
>> atom.
>>
>> Perhaps there is a performance reason against it.
>>
>> I would doubt that existing code in the wild relies on the error for any
>> other purpose than to convert the scalar into a list of 1 item.
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>
>
> ---
> This email has been checked for viruses by AVG.
> https://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

Reply via email to