http://d.puremagic.com/issues/show_bug.cgi?id=8384



--- Comment #10 from Jonathan M Davis <jmdavisp...@gmx.com> 2012-08-15 13:35:28 
PDT ---
char* acts identically to the other pointer types, and I fully believe that it
should stay that way. We've pretty much removed all of the D features which
involved either treating a string as char* or a char* as a string (including
disallowing implicit conversion of string to const char*). The _only_ feature
that the language has which supports that is the fact that string literals have
a null character one past their end and will implicitly convert to const char*.

It would be a huge mistake IMHO to support doing _anything_ with character
pointers which treats them as strings without requiring an explicit conversion
of some kind. Anyone who continues to think of char* as being a string in D is
just asking for trouble. They need to learn to use strings correctly.

If you really want to use char* as a string in functions like format or
writeln, then simply either use to!string or ptr[0 .. strln(ptr)].

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to