Strange implicit conversion integers on concatenation

Adam D. Ruppe destructionator at gmail.com
Mon Nov 12 20:31:44 UTC 2018


On Monday, 12 November 2018 at 20:23:42 UTC, Andrei Alexandrescu 
wrote:
> If we deprecate that we also need to deprecate:
>
>     string res = `Number value: ` ~ 65;
>
> Not saying we shouldn't, just that there are many implications.

I'd call that a good thing, many people are surprised when ~ x 
doesn't do ~ to!string(x), and besides, a number isn't really a 
character.

I'd be happy if you had to write:

`Number value: ` ~ char(65).


More information about the Digitalmars-d mailing list