Proposal: clean up semantics of array literals vs string literals
Peter Alexander
peter.alexander.au at gmail.com
Tue Oct 2 08:46:39 PDT 2012
On Tuesday, 2 October 2012 at 15:14:10 UTC, Andrei Alexandrescu
wrote:
> However, so far I held off of defining such a range because
> C-strings are seldom useful in D code [...]
I think your view of what is common in D code is not
representative. You are primarily a library writer, which means
you rarely have to interface with other code. Please correct me
if I'm wrong, but I don't believe you've written much
application-level D code.
For people that write applications, we have the unfortunate chore
of having to call lots of C APIs to get things done. There's a
long list of things for which there is no D interface (graphics,
audio, input, GUI, database, platform APIs, various 3rd party
libs). Invariably these interfaces require C strings. In short,
if you write applications in D, you need C strings.
I don't know what the right decision is here, but please do not
say that C-strings are seldom useful in D code.
More information about the Digitalmars-d
mailing list