What did you think about an implicitConversionOp ?

sighoya sighoya at gmail.com
Sat Dec 26 15:48:49 UTC 2020


I like the idea of an `implicitConversionOp` or 
`implicitCoercionOp` more than multiple alias this since the 
operator is separated from the source type.

It was already proposed here: 
https://forum.dlang.org/post/qdwiajtugvqpdlyvbvda@forum.dlang.org

But I think to mitigate Walther's main concerns about multiple 
inheritance, we need to adapt D's overload resolution to support 
specialization on concrete types:

1.) Best match
2.) Inferring an order of methods regarding implicit conversions 
if possible

What is your opinion regarding this?



More information about the Digitalmars-d mailing list