UFCS with constructors
Maxim Fomin
maxim at maxim-fomin.ru
Wed Nov 6 10:16:03 PST 2013
On Wednesday, 6 November 2013 at 18:02:32 UTC, Ali Çehreli wrote:
> > But such
> > expectations need not correspond to language rules (try to
> think from
> > from language laywer perspective).
>
> I still argue that the expression -expr must have the same type
> as expr.
>
> > In bearophile case, I guess
> > Typedef!double overloads unary operator which returns double
> which is
> > primary reason for such behavior.
>
> That's what I deduced from qznc's post and tried to mean that
> such behavior would be confusing to programmers.
>
> Ali
I think that reason for such behavior is the way used defined
operator overloading functions are implemented, not the language
per se, so programmers confuse themselves.
More information about the Digitalmars-d-learn
mailing list