[Issue 8384] std.conv.to should allow conversion between any pair of string/wstring/dstring/char*/wchar*/dchar*

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 15 13:24:12 PDT 2012


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



--- Comment #9 from Vladimir Panteleev <thecybershadow at gmail.com> 2012-08-15 13:24:08 PDT ---
Another case of confusion due to format treating C strings as pointers:

http://stackoverflow.com/q/11975353/21501

I still think that the current behavior, regardless of how much it makes sense
from a design/consistency/orthogonality/etc. perspective, is simply not useful
and fails the principle of least surprise in most expected cases.

I strongly believe that we should either forbid passing char pointers to
format/writeln (and force the user to cast to void* or convert to a D string),
or print them as C null-terminated strings.

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


More information about the Digitalmars-d-bugs mailing list