[phobos] AutoImplement: Shouldn't it be a mixin template?
David Simcha
dsimcha at gmail.com
Wed Sep 8 08:16:56 PDT 2010
On Wed, Sep 8, 2010 at 2:07 AM, SK <sk at metrokings.com> wrote:
> On Tue, Sep 7, 2010 at 8:54 PM, David Simcha <dsimcha at gmail.com> wrote:
> > The AutoImplement functionality in std.typecons is currently a class.
> This
> > severely and unnecessarily limits its usefulness in the following cases:
> >
>
> Hi - Being poorly versed in mixins, I mentally picture the mess of
> preprocessor macro abuse. Are mixins going to make phobos in this
> case easier to reason about and debug?
Yes, at least compared to the error-prone and verbose boilerplate code that
they're intended to replace.
> Do I ever get to see (and step
> though) the source that actually got compiled?
>
No, but the whole point is that the code will be less buggy in the first
place than manually written boilerplate code.
> I'd like to feel better that mixins are on *much* friendlier turf than
> macros.
>
>
They are. For example, they have a concept of scope and work at the
semantic, rather than the textual, level. For example, you don't need to
give mixins UGLY_ALL_CAPS_NAMES because they won't accidentally expand.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20100908/7e5d3f82/attachment.html>
More information about the phobos
mailing list