Using glog's design for Phobos?
Simen kjaeraas
simen.kjaras at gmail.com
Fri Aug 27 10:04:31 PDT 2010
Steven Schveighoffer <schveiguy at yahoo.com> wrote:
> This is one of the only reasons I think we need a macro system. Mixins
> can do this, but who wants to always write mixin when doing logging?
>
> lazy is traditionally used, but it has costs as well. The best solution
> is to have a macro that converts:
>
> log.info(msg);
>
> directly into:
>
> if(log.level >= info) log.output(msg);
>
> which doesn't require lazy and is exactly what you *should* write.
This would, at least to an extent, be covered by my enhancement request
at http://d.puremagic.com/issues/show_bug.cgi?id=3666.
That said, proper macros is one of the things I want the most for D.
--
Simen
More information about the Digitalmars-d
mailing list