Design question regarding saving changes in the original array and/or returning a new set

matheus matheus at gmail.com
Sun Oct 23 18:14:01 UTC 2022


On Sunday, 23 October 2022 at 16:16:55 UTC, Sergey wrote:
> On Sunday, 23 October 2022 at 15:47:27 UTC, matheus wrote:
>> Hi H. S. Teoh,
>>
>> I think you misunderstood my question, since English is not my 
>> first language maybe this was a problem from my part, but 
>> anyway, I'm not talking about "sort" from main library.
>>
>> This example was if I had designed my "own version".
>>
>> Matheus.
>
> Hi, Matheus. I'm not an expert in programming :)
> But I believe it should be up to you. How you make your 
> function...

Hi, yes I know but I'd like to know what is the most "common way" 
of doing this. I think I'll use the library as example, except 
that I think that I'd do otherwise, calling "sort()" would give a 
duplicate, and chaining with "save()" or "inplace()" would sort 
the caller.

Thanks,

Matheus.


More information about the Digitalmars-d-learn mailing list