1.    The standard library contains the verb  sort which gives as monadic 
case the sorted argument but retains the Dictionary   sortup  definition. 
Note the Vocab page uses  Sort as the dyadic case not SortUp but since the 
verb sort is in the standard library it is not provided as an alternative in 
the primitives script.

2.    If you want an alternative name for the dyadic case    sortwith  or 
sortby  might be simple options.

3.    The primitives script uses the Dictionary names.   If Roger changes 
those then the primitives script should be changed.

4.    In any case you cannot arbitrarily change the primitives script, 
especially after just 24 hours discussion on the forum. You do not know who 
all may be using it.  If there are changes it should be with a new release 
and they should be documented, and where possible retain backwards 
compatibility.

Fraser

---- Original Message ----- 
From: "Alex Rufon" <[email protected]>
To: "General forum" <[email protected]>
Sent: Wednesday, March 04, 2009 4:15 PM
Subject: Re: [Jgeneral] SortUp and GradeUp in the Primitives


> Thanks for the comments guys.
>
> Currently, I internally redefined SortUp ...
>
> So, who should change the primitives.ijs file from SortUp to 
> SortUpUsingKeys?
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] 
> On Behalf Of Henry Rich
> Sent: Tuesday, March 03, 2009 10:14 PM
> To: General forum
> Subject: Re: [Jgeneral] SortUp and GradeUp in the Primitives
>
> I suggest renaming SortUp to SortUpUsingKeys.
>
> Henry Rich
>
>
>
> bill lam wrote:
>> On Tue, 03 Mar 2009, Sherlock Ric wrote:
>>> ---Alex Rufon wrote:
>>>> SortUp and GradeUp are both defined as /: in the primitives.  In
>>>> parallel, SortDown and GradeDown also suffers the same issue.
>>> SortUp refers to dyadic use of /:, GradeUp refers to monadic use of /:
>>>
>>> /:~ myarray
>>> Is the special case of SortUp where you are sorting it by the grade of 
>>> itself, i.e.
>>> myarray /: myarray
>>> However often you will want to use
>>> myarray /: my2ndarray
>>>
>>> You cannot do this if you redefine SortUp as /:~
>>
>> I think Alex's argument is reasonable. Dyadic sort is alien to most
>> programmers.  If primitives are meant for beginners,  rename SortUp as
>> DyadSortUp and define SortUp as /:~ will cause less surprise for those
>> not yet initiated.
>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> 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