[Gambas-user] New feature in the Array classes
Brian G
brian at westwoodsvcs.com
Sat Feb 13 00:15:37 CET 2021
But if you just used a sorted array, it would always be sorted. No need of any conversion.. or special functions.
Ummmm, and if you updated your code to use one, then you just change one place.. the definition, all the interface calls are pretty much the same
--
Thanks
Brian Friday, 12 February 2021, 10:36AM -08:00 from Tony Morehen tmorehen at ajm-software.com :
>Why?
>A common scenario: You fill an array with raw unsorted data.
> You sort the array. Now you can use the faster sorted functions
> to work with the data. If only a sorted array type has those
> functions, you must convert your origibal base array into a sorted
> array.
>On 2021-02-12 12:44 p.m., Brian G
> wrote:
>>For simplicity and clarity, would it not be better to just
>> have a sorted array as a base type, rather than all these
>> compromises.
>>
>>a = new sorted_array[]
>>and
>>a = new array[]
>>
>>Thank You
>>Brian G
>>
>>----------------------------------------------------------------------
>>From: "Jussi Lahtinen"
>>To: "Gambas mailing list"
>>Sent: Wednesday, February 10, 2021 9:55:55 AM
>>Subject: Re: [Gambas-user] New feature in the Array
>> classes
>>
>>
>>>For backward-compatibility, I think it's better to
>>> leave the current
>>>method untouched.
>>
>>Because of method overriding?
>>It would be nice, if you could
>> leave out optional arguments when overriding, then this
>> could also be implemented as optional argument.
>>
>>Jussi
>>
>>
>>----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>
>>
>>----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>
>
>----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210213/387a3379/attachment-0001.htm>
More information about the User
mailing list