[Jprogramming] Equivalent functionality to APL indexed modified assignment

Henry Rich henryhrich at gmail.com
Mon Nov 4 01:48:53 UTC 2019


I'd say that scratches the surface.

First you would have to define something akin to a[x], which is not J 
syntax.

Then you would have to decide what assignment to a[x] means when x has 
repeated indexes.

Then you would have to decide what a[x] +=: y  means when x has repeated 
indexes.  Does it impose an order of operations?  Do you insist that it 
work atom by atom, as if we were running on a 68000?

What would a[x] +=: a[x] give?

What about a[x] +=: a[a[x]] ?  In what order are the updates to a to be 
made?

I think you would end up leaving a large part of the spec undefined.  
That might be OK is the defined bit is very useful.

hhr




On 11/3/2019 8:08 PM, Raul Miller wrote:
> Two tricks here:
>
> (1) Designing the altered parser table to handle this case (without
> breaking existing code), and
>
> (2) implementing it.
>


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



More information about the Programming mailing list