Implicit encoding conversion on string ~= int ?
Jonathan M Davis
jmdavisProg at gmx.com
Sun Jun 23 17:50:01 PDT 2013
On Sunday, June 23, 2013 19:25:41 Adam D. Ruppe wrote:
> On Sunday, 23 June 2013 at 16:37:18 UTC, bearophile wrote:
> > I didn't know that, is this already in Bugzilla?
>
> I don't know, but if it is, it is probably marked as won't fix
> because I'm pretty sure this has come up before, but it is
> actually by design because a char in C is considered an integral
> type too.
This is definitely by design. Walter is definitely in the camp that thinks that
chars are integral types, so they follow all of the various integral
conversion rules. In some cases this is nice. In others, it's bug-prone, but I
think that we're stuck with it regardless of whether it's ultimately a good
idea or not. I don't think that we even succeeded at coming close to
convincing Walter that _bool_ isn't an integral type and shouldn't be treated
as such (when it was discussed right before deconf), and that should be a far
more clearcut case.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list