<br><br><div class="gmail_quote">On Wed, Sep 8, 2010 at 2:07 AM, SK <span dir="ltr"><<a href="mailto:sk@metrokings.com">sk@metrokings.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Tue, Sep 7, 2010 at 8:54 PM, David Simcha <<a href="mailto:dsimcha@gmail.com">dsimcha@gmail.com</a>> wrote:<br>
> The AutoImplement functionality in std.typecons is currently a class. This<br>
> severely and unnecessarily limits its usefulness in the following cases:<br>
><br>
<br>
</div>Hi - Being poorly versed in mixins, I mentally picture the mess of<br>
preprocessor macro abuse. Are mixins going to make phobos in this<br>
case easier to reason about and debug? </blockquote><div><br>Yes, at least compared to the error-prone and verbose boilerplate code that they're intended to replace.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Do I ever get to see (and step<br>
though) the source that actually got compiled?<br></blockquote><div><br>No, but the whole point is that the code will be less buggy in the first place than manually written boilerplate code.<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I'd like to feel better that mixins are on *much* friendlier turf than macros.<br>
<br></blockquote><div> <br>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.<br>
</div></div><br>