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

Oskar Linde oskar.lindeREM at
Sat Dec 2 02:57:22 PST 2006

== Quote from Tomas Lindquist Olsen (tomas at'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.


More information about the Digitalmars-d mailing list