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 the collection making it a
lexical oddity that users need to be familiar with.
2) There doesn't seem to be an easy way to test for the sparseness of an
array beyond (a~items = a~makeArray~items) which could be quite resource
intensive in itself, and the concept of sparseness also requires more than
a passing familiarity with arrays and the concept of the nil object
3) Although there is exception handling in Rexx and ooRexx, it always feels
odd to me when it needs to be used in non-exceptional circumstances, like
verifying a date format or detecting the end of file. It's not hard to do,
but it feels more 'advanced'. Needing to catch sparse arrays if you sort
is not desirable.
4) The ability to turn all collections into arrays, including files and
queues and then sort them is a very important part of the ooRexx toolkit.
When it was missing it was a turn-off for non-users and it has been great
to have it. By some coincidence, when I search my codebase I find that I
have already made use of it exactly 100 times.
IMHO it would be a kindness to our users to allow the sort method to cope
with sparseness, but perhaps that is not so easy to do from a technical
point of view.
just my two pence worth
Jon
On 24 August 2012 14:29, Rick McGuire <[email protected]> wrote:
> 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 <[email protected]>wrote:
>
>>
>>
>> On Fri, Aug 24, 2012 at 9:23 AM, Mike Cowlishaw <[email protected]>wrote:
>>
>>> > 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
>>>
>> This already exists in the form of the makearray method. This does,
>> however, allocate a new instance, so it might be worth exploring an
>> "in-place" condense.
>>
>>
>>> .. versions of Sorts that automatically condense before/during sorting
>>>
>> I'm really opposed to adding additional versions of the sorts given it so
>> easy to condense an array
>> already.
>>
>>
>>> .. all Sorts condense before/during sorting (although I suppose this
>>> could
>>> break some existing programs?
>>>
>>
>> Probably wouldn't break anything, given this is currently an error, but
>> given the above, I really don't think this should be done.
>>
>> Rick
>>
>>
>>>
>>> Mike
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Oorexx-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>>>
>>
>>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel