"chain" vs "~"
frame
frame86 at live.com
Mon Aug 8 13:26:49 UTC 2022
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 "~".
More information about the Digitalmars-d-learn
mailing list