Rony, I just tried to vote, but there was no response when clicking the
button.  What else must I do to register a vote?

 

 

From: Rony G. Flatscher [mailto:[email protected]] 
Sent: Tuesday, August 28, 2012 06:49
To: [email protected]
Subject: Re: [Oorexx-devel] Ad sorting arrays: request for
discussion/thoughts ...

 

Just realized (from habits of the past) that I forgot to explicitly ask for
voting (up or down or abstain)!

So please, if interested in any of these RFEs below, then consider to vote
up or down or abstain by clicking on the link and then press the + button or
the - button. If you want to abstain after having clicked any of these
buttons, just re-click them, such that they pop back to neutral (abstain).

---rony



On 25.08.2012 13:09, Rony G. Flatscher wrote:

Hi there,

thank you very much for all of your feedback which encouraged me to create
the following two RFEs:

*       feature-requests:479 Add a condense method to the Array class:
<https://sourceforge.net/p/oorexx/feature-requests/479/> and
*       feature-requests:480 Allow the sort/sortWith methods to sort sparse
arrays as well: <https://sourceforge.net/p/oorexx/feature-requests/480/>

---rony

 

On 24.08.2012 12:01, Rony G. Flatscher 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/>
<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 about my utmost surprise that
sort would raise an error condition if it hits an empty array element (one
without an entry) in between, I try to summarize my thoughts about the
current behaviour, requesting a change of the design and implementation to
get rid of the surprising factor and to remove undeterminable fragility from
the Array sort.

First, the current design and implementation:

The single dimiensioned array that gets sorted must not have empty entries
in between. If the sort tries to refer to an empty slot it raises "Error
98.975: Missing array element at position xyz" and the program is ended, if
the condition does not get trapped.

Thoughts about this:

1.      Having worked for many years sorting arrays, I was *totally
surprised* about this unexpected (because never experienced) behaviour! The
surprise factor for me was at the maximum. 
2.      There is no documentation going with sorting arrays that would
communicate that the arrays to be sorted must have no empty elements in
between that I am aware of. Therefore one cannot expect this behaviour at
all.
3.      If one uses single dimensioned arrays that get changed in routines
and methods (written by others) such that elements get removed in between,
then sorting such an array all of a sudden (and totally unforseeable) raises
the above mentioned error condition, which makes sort quite fragile for
programmers IMHO.

1.      To overcome this situation, one must advice every ooRexx programmer
to do *always* a (potentially time-consuming) makearray before sorting an
array just to make sure that the aforementioned error condition does not get
raised.

4.      Finally, I would have expected that an array with empty elements
should be sortable without a problem, therefore my utmost surprise! :) 

1.      My expectations would be simply as follows: if a single dimensioned
array contained empty elements, then sorting would work and all the empty
elements are sorted to the end of the array, no matter what the comparison
method returns. This way, after a sort, all empty elements are always at the
end of the array. (The items and size messages would remain the same.)

The questions I would have, before contemplating about filing a RFE: 

*       am I the only one who is surprised about a failing sort on a single
dimensioned array if in between there are empty elements? 
*       Independent of this, would it be acceptable to change the current
design and implementation of the sort such that empty elements are tolerated
and put to the end of the array (what would be arguments, thoughts that
speak against such a change)?

---rony

 

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

Reply via email to