operator "~" does not check type?

Trass3r un at known.com
Wed Oct 12 06:46:57 PDT 2011


> I believe that the primary reasoning for allowing the implicit conversion
> between int and dchar is so that code like this
>
> dchar c = 'a' + 7;

That's a '+' though, not a '~'.

I think it shouldn't be allowed with ~ since it's misleading.
Newbies would probably expect "abc" ~ 10 to yield "abc10" rather than the  
odd "abc\n".


More information about the Digitalmars-d-learn mailing list