"chain" vs "~"

FeepingCreature feepingcreature at gmail.com
Sun Aug 7 01:27:36 UTC 2022


On Sunday, 7 August 2022 at 01:22:18 UTC, pascal111 wrote:
> Why we use "chain" while we have "~":
>
> '''D
> int[] x=[1,2,3];
> int[] y=[4,5,6];
>
> auto z=chain(x,y);
> auto j=x~y;
> '''

Chain doesn't allocate any memory. This can be useful 
occasionally.


More information about the Digitalmars-d-learn mailing list