Suggestion: Remove implicit conversion from T[n] and T[] to T*

Alexander Panek a.panek at brainsware.org
Sat Dec 2 04:21:25 PST 2006


Apart from that is printf obsolete. :P

Oskar Linde wrote:
> == Quote from Tomas Lindquist Olsen (tomas at famolsen.dk)'s article
>> I think it should stay as-is for the sole reason that otherwise this
>> wouldn't work:
>> printf("hello world");
> 
> String literals in D are special in the way that the type they commit to are
> dependent on the context they appear in. That means that the above could still
> work even if the implicit conversion was removed. This is the reason I didn't
> count those occurrences in the Phobos analysis.
> 
> String literals (and maybe const-folded string expressions?) are the only cases
> where D guarantees zero termination.
> 
> /Oskar



More information about the Digitalmars-d mailing list