UFCS and constructors

Jonathan M Davis jmdavisProg at gmx.com
Tue Jul 2 10:58:18 PDT 2013


On Tuesday, July 02, 2013 14:46:41 Timon Gehr wrote:
> > Do we want to keep it?
> 
> There is no reason to artificially ban it.

There's nothing artificial about it. Constructors are not normal functions and 
should not be treated as such. They're fundamentally different from normal 
functions.

Also, in all other cases, UFCS involves using a free function as if it were a 
member function, so it's incredibly bizarre as well as inconsistent with the 
rest of UFCS to allow constructors to be used with it.

- Jontahan M Davis


More information about the Digitalmars-d mailing list