Eliminate redundancy of dup/idup

Jesse Phillips jessekphillips+D at gmail.com
Sun Sep 9 09:19:46 PDT 2012


On Sunday, 9 September 2012 at 15:32:01 UTC, kenji hara wrote:
> Finally, built-in dup and idup are merged into library dup(). 
> Destroy!
>
> Kenji Hara

Well, that is pretty awesome. I didn't see an example which says 
this would work, but I expect it would?

char[] a = dup("Hello");
string b = dup(a);

I'm not as familiar with the pure to immutable but I believe to 
immutable(char)[] is or should be valid right?


More information about the Digitalmars-d mailing list