[Oorexx-devel] Ad sorting arrays: request for discussion/thoughts ...

2012-08-24 Thread Rony G. Flatscher
Yesterday I stumbled over a surprising behaviour of Array's sort, which led me to open a bug report https://sourceforge.net/p/oorexx/bugs/1107/. Obviously the sorting is working as designed, hence the reported behaviour was not accepted as a bug. Having slept a night over this and thinking

Re: [Oorexx-devel] Ad sorting arrays: request for discussion/thoughts ...

2012-08-24 Thread hakan
I reported this already (item #3151709, was opened at 2011-01-05 09:52), and I was also surprised. There is a note in REXXREF about sorting arrays and non-sparse arrays (page 285). I found out after reporting. I think it's not consistent with Do s over array say s end This will show all

Re: [Oorexx-devel] Ad sorting arrays: request for discussion/thoughts ...

2012-08-24 Thread Rick McGuire
On Fri, Aug 24, 2012 at 7:15 AM, hakan hexi...@users.sourceforge.netwrote: ** I reported this already (item #3151709, was opened at 2011-01-05 09:52), and I was also surprised. There is a note in REXXREF about sorting arrays and non-sparse arrays (page 285). I found out after reporting. I

Re: [Oorexx-devel] Ad sorting arrays: request for discussion/thoughts ...

2012-08-24 Thread Jeremy Nicoll - ml sourceforge
Rick McGuire object.r...@gmail.com wrote: These are fundamentally different constructs. Do Over actually requests a new version from the collection which is defined as being non-sparse. The sort is an in-place modification of the array itself. REXX used to have a principle of least

Re: [Oorexx-devel] Ad sorting arrays: request for discussion/thoughts ...

2012-08-24 Thread Jeremy Nicoll - ml sourceforge
Rony G. Flatscher rony.flatsc...@wu-wien.ac.at wrote: Yesterday I stumbled over a surprising behaviour of Array's sort, which led me to open a bug report https://sourceforge.net/p/oorexx/bugs/1107/. Obviously the sorting is working as designed, hence the reported behaviour was not accepted as

Re: [Oorexx-devel] Ad sorting arrays: request fordiscussion/thoughts ...

2012-08-24 Thread Mike Cowlishaw
I've read this and the bug report and think one could argue it from both points of view... Couple of other (maybe already there) possibilities: .. a 'condense' operation that removes empty slots .. versions of Sorts that automatically condense before/during sorting .. all Sorts condense

Re: [Oorexx-devel] Ad sorting arrays: request fordiscussion/thoughts ...

2012-08-24 Thread Rick McGuire
btw, I should also point out that the trunk version already has a delete method on array, which will remove an item and shift all of the following elements up one. Rick On Fri, Aug 24, 2012 at 9:28 AM, Rick McGuire object.r...@gmail.com wrote: On Fri, Aug 24, 2012 at 9:23 AM, Mike Cowlishaw

Re: [Oorexx-devel] Ad sorting arrays: request fordiscussion/thoughts ...

2012-08-24 Thread Sahananda (Jon) Wolfers
This is only a problem if you use the remove method which creates a sparse array - right? From a users point of view there are several things here which are not straightforward. 1) The makeArray method everywhere else creates an array from a collection, but the array class makearray method packs

Re: [Oorexx-devel] Ad sorting arrays: request for discussion/thoughts ...

2012-08-24 Thread Jeremy Nicoll - ml sourceforge
Rick McGuire object.r...@gmail.com wrote: On Fri, Aug 24, 2012 at 7:15 AM, hakan hexi...@users.sourceforge.netwrote: I think it's not consistent with Do s over array say s end These are fundamentally different constructs. Do Over actually requests a new version from the collection which

Re: [Oorexx-devel] Ad sorting arrays: request for discussion/thoughts ...

2012-08-24 Thread Rick McGuire
On Fri, Aug 24, 2012 at 8:21 PM, Jeremy Nicoll - ml sourceforge jn.ml.sfrg...@letterboxes.org wrote: Rick McGuire object.r...@gmail.com wrote: On Fri, Aug 24, 2012 at 7:15 AM, hakan hexi...@users.sourceforge.netwrote: I think it's not consistent with Do s over array say s end

Re: [Oorexx-devel] Ad sorting arrays: request for discussion/thoughts ...

2012-08-24 Thread Rick McGuire
On Fri, Aug 24, 2012 at 8:43 PM, Jeremy Nicoll - ml sourceforge jn.ml.sfrg...@letterboxes.org wrote: Rick McGuire object.r...@gmail.com wrote: Do Over is defined as operating on a snapshot of the collection, so this is a requirement for the instruction. Do you mean because the code inside