"chain" vs "~"

pascal111 judas.the.messiah.111 at gmail.com
Mon Aug 8 22:57:30 UTC 2022


On Monday, 8 August 2022 at 13:26:49 UTC, frame wrote:
> On Monday, 8 August 2022 at 01:05:40 UTC, pascal111 wrote:
>
>> In next program, I used "insertInPlace", not "~" nor "chain", 
>> should I use "~" or it's the same as "insertInPlace"?
>>
>> https://github.com/pascal111-fra/D/blob/main/coco.d
>
> As you may noticed, `insertInPlace` has another purpose than 
> just appending data. And it will create a new range (to call 
> itself again), moves memory and places the item there, so it's 
> rather inefficient than just appending a single item via "~".

I applied "~" in next program:

https://github.com/pascal111-fra/D/blob/main/proj06.d


More information about the Digitalmars-d-learn mailing list