On Mon, 19 May 2014, Beno?t Minisini wrote:
> Le 19/05/2014 17:42, Tobias Boege a ?crit :
> >>I don't understand that: if the sort field is a parameter of the sort,
> >>then you can store it inside a static variable just during the sort.
> >>
> >
> >Hmm... that's an idea, indeed! Because we can ensure that no parallel sorts
> >mess up the static variable.
> >
> >Too bad that this is a good solution. We were already excited about this
> >potential new feature :-)
> >
> >Regards,
> >Tobi
> >
> 
> OK, but that potential new feature would have slowed down the sort: calling
> a _compare method with two fixed arguments is faster that calling a _compare
> method with one more optional argument.
> 

Right... Having two differently implemented versions of Object[].Sort() (one
which behaves efficiently when not given an optional argument and one which
passes that argument) is, if not an insane interface, at least nothing that
belongs to the gb component.

For our purposes, maybe a small component gb.multisort may suffice which
enhances Object[] by the necessary logic and we would require users to
provide a _compare2() then which could take the additional argument. No
big deal.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to