Disallow arrays as pointers
Jonathan M Davis
jmdavisProg at gmx.com
Sun Oct 30 15:16:45 PDT 2011
On Sunday, October 30, 2011 18:10:06 bearophile wrote:
> Jonathan M Davis:
> > However, I don't think that you're going to find a general consensus
> > that the implicit conversion is bad,
>
> I'll keep count how many are against this idea.
>
> > and changing it now would likely break a lot of code.
>
> How much code is broken by this?
> It's bad D code that's easy to fix adding a ".ptr", or using "-d"
> (deprecated) to compile the code.
I think that it will primarily affect strings (though in many such cases
toStringz or toUTFz should generally be used), but from what I understand,
it's quite common for D programmers interacting with C code to just pass
arrays to C functions without using the ptr property.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list