Purity
Simen kjaeraas
simen.kjaras at gmail.com
Thu Jan 27 13:05:48 PST 2011
Bruno Medeiros <brunodomedeiros+spam at com.gmail> wrote:
> string[] func(string arg) pure {
> string elem2 = "blah".idup;
> return [ arg, elem2 ];
> }
>
> The compiler *cannot* know (well, looking at the signature only of
> course) how to properly deepdup the result from the first return value,
> so as to give the exact same result as if func was called again.
Could you please elucidate, as I am unsure of your reasoning for saying
the compiler cannot know how to deepdup the result.
--
Simen
More information about the Digitalmars-d
mailing list