[Jprogramming] (v0`v1`v2)} y

Henry Rich henryhrich at gmail.com
Mon Sep 17 14:54:43 UTC 2018


You might note that in NuVoc we called m} y 'Composite Item' rather than 
'Item Amend'.

Your points are reasonable, but not compelling IMO, and there's no way 
it could be right to make such an incompatible change without a 
substantial benefit.


The code to support amend-in-place, as in

name =: a} b ,: name

is some of the strangest in the JE in that it is so much code for so 
little bang.  I have suspected that there must have been an early 
customer who needed this function very much.

Henry Rich


On 9/17/2018 9:16 AM, 'Pascal Jasmin' via Programming wrote:
> amend and item amend are completely different verbs with the monadic version much more similar to a "select" operation than an update operation.
> (v0`v1`v2)} y is a select verb, that doesn't even match the update behaviour, and so doesn't need to be made ambivalent to dyadic  x (v0`v1`v2)} y
>
> my suggestions:
> v0`v1} would be (v0 {"0 1&.|: v1) and can/could be called ambivalently
> (v0`v1`v2)}y would be (v0 y) (v1 y)} ( v2 y)  (calling amend even monadically... and also the same verb as dyadic call
>
> I would suggest that the entire history of use for v0`v1`v2} y has been a mistaken omission of the x parameter on an intended amend call.
> ----------------------------------------------------------------------
> 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



More information about the Programming mailing list