[Issue 11837] String literals should convert to const(void)*

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 24 03:04:33 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=11837



--- Comment #13 from yebblies <yebblies at gmail.com> 2014-02-24 22:04:19 EST ---
(In reply to comment #12)
> 
> > > I also don't see memcmp usage as a compelling must-have use case.
> > 
> > Given that A converts to B, and B converts to C, why doesn't A convert to C? 
> > memcmp is a symptom of this strange limitation.
> 
> [snip] I have severe reservations about doing this
> just for memcmp(). Need a better reason.


I gave you a reason, in fact, you quoted it.

A converts to B, and B converts to C, but A doesn't convert to C.

Why shouldn't A convert to C?????

I'm not proposing a new special case, I'm trying to remove one that was
introduced for reasons forgotten.

> Changing overloading rules can have unexpected and far reaching consequences.
> It is not very knowable in advance. 

The same reasoning could be used to block every change to the compiler.  Every
non-trivial change could potentially affect something unintended.  The only way
forward is to do your best to identify problems, then implement it and wait for
regression reports.

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


More information about the Digitalmars-d-bugs mailing list