Feature Request: make void a value type
downs
default_357-line at yahoo.de
Mon Dec 3 10:52:25 PST 2007
Christopher Wright wrote:
> I did have completely separate ways of proxying void methods versus
> returning methods, and it was a mess. Ugliness to the core. Right now,
> I'm replacing it with static ifs, which is bulky and ugly, but it avoids
> rampant code duplication.
>
> Your suggestion would simplify my code even more. I could eliminate
> almost all the static ifs, as long as void.init worked.
.init is broken in interesting ways for several cases (ever tried typeof((int[4]).init)?)
Try template Init(T) { T Init; } instead. :)
--downs
More information about the Digitalmars-d
mailing list