Named constructors

Neia Neutuladh neia at ikeran.org
Wed Jan 9 22:36:41 UTC 2019


On Wed, 09 Jan 2019 21:52:00 +0000, JN wrote:
> Perhaps, but sometimes it feels like the language features are set in
> stone at this point. As long as you can implement a language feature X
> with template magic, even if it's partially implementing X, it will be
> used as an excuse why X shouldn't be a language feature.

Things that give a little benefit over a template solution are guaranteed 
to be rejected. The solutions for named constructors are pretty clunky, on 
the other hand, either requiring use of reserved symbols or not supporting 
const fields, so a named constructors DIP is only likely to be rejected.


More information about the Digitalmars-d mailing list