Not that I've seen the implementation code, but the thought is that none of 
the optimizations would be affected if at a high level
v0`v1`v2} is always amend (regardless of valence)
v0`v1} is always composite item.
My proposal was/is to allow the composite item version to be ambivalent (for 
definitional simplicity and convenience), but its not what I care about.  Its 
just the first version that has no current use monadically.
The pattern where monadic amend is useful is when y is a boxed record structure 
where data in one field can help update another field.  Or simplicity when the 
update value is a function of the data.


    On Monday, September 17, 2018, 10:54:48 a.m. EDT, Henry Rich 
<[email protected]> wrote:  
 
 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

----------------------------------------------------------------------
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