--- Comment #3 from Jonathan M Davis <> 2011-06-30 18:28:29 
PDT ---
Your suggestion doesn't help at all with remembering to use zero-terminated
strings when calling C code. For that you have to remember that you need to do
that and that toStringz is the function to use to get a zero-terminated string.
Adding your example to toStringz's documenation wouldn't help anyone remember
to use it.

If anything is wrong with the type system, it's the fact that it implicitly
converts arrays to pointers, but even if it required you to use the ptr
property instead, people would still have to remember to use toStringz for
strings. So, such a change to type system wouldn't help any. Are your
suggestion only helps as far as the type system goes if all of the C functions
in druntime or wherever use CcharPtr instead of char*, since if the function
takes char*, you can still pass a string directly to them even if you have
CcharPtr to use if you want to. So, I don't see how this suggestion helps much
of anything.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to