Can we disallow appending integer to string?
H. S. Teoh via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Apr 20 15:41:34 PDT 2017
On Thu, Apr 20, 2017 at 10:39:01PM +0000, Stanislav Blinov via Digitalmars-d-learn wrote:
> On Thursday, 20 April 2017 at 19:20:28 UTC, H. S. Teoh wrote:
>
>
> > Another pernicious thing I encountered recently, related to implicit
> > conversions, is this:
> >
> > https://issues.dlang.org/show_bug.cgi?id=17336
> >
> > It drew a very enunciated "WAT?!" from me.
>
> Yeah, that one is annoying. I've dealt with this before with:
>
> alias OpResult(string op, A, B) = typeof((){ A* a; B* b; return
> mixin("*a"~op~"*b"); }());
Yeah, wow, that is very annoying.
T
--
Debian GNU/Linux: Cray on your desktop.
More information about the Digitalmars-d-learn
mailing list