What did you think about an implicitConversionOp ?
Paul Backus
snarwin at gmail.com
Sat Dec 26 16:26:14 UTC 2020
On Saturday, 26 December 2020 at 15:48:49 UTC, sighoya wrote:
> I like the idea of an `implicitConversionOp` or
> `implicitCoercionOp` more than multiple alias this since the
> operator is separated from the source type.
User-defined implicit conversions have been proposed many, many
times, and Walter has always rejected them. For example, here's a
reply of his to a post from 2004:
> Implicit casting is a great idea. It's problems don't become
> apparent for years, when battle-weary programmers eventually
> conclude that it just causes more problems than it is worth. I
> know that it is difficult to be convincing in a few lines about
> this, but when the complexity of the classes goes beyond the
> trivial, the interactions between them and other classes with
> implicit casting becomes remarkably impenetrable.
https://forum.dlang.org/post/cqoj59$sle$1@digitaldaemon.com
More information about the Digitalmars-d
mailing list