<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 18, 2013 at 3:00 PM, Dan Smith <span dir="ltr"><<a href="mailto:dms@danplanet.com" target="_blank">dms@danplanet.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry for the delay in responding to this...<br>
<div class="im"><br>
>   * Moved the _obj_classes registry magic out of ObjectMetaClass and into<br>
>     its own method for easier use.  Since this is a subclass based implementation,<br>
>     having a separate method feels more appropriate for a factory/registry<br>
>     pattern.<br>
<br>
</div>This is actually how I had it in my initial design because I like<br>
explicit registration. We went off on this MetaClass tangent, which buys<br>
us certain things, but which also makes certain things quite difficult.<br>
<br>
Pros for metaclass approach:<br>
 - Avoids having to decorate things (meh)<br>
 - Automatic to the point of not being able to create an object type<br>
   without registering it even if you wanted to<br>
<br>
Cons for metaclass approach:<br>
 - Maybe a bit too magical<br>
 - Can make testing hard (see where we save/restore the registry<br>
   between each test)<br>
 - I think it might make subclass implementations harder<br>
 - Definitely more complicated to understand<br>
<br>
Chris much preferred the metaclass approach, so I'm including him here.<br>
He had some reasoning that won out in the original discussion, although<br>
I don't really remember what that was.<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>It's almost always possible to go without metaclasses without losing much relevant brevity, and improving clarity. I strongly recommend against their use.<br clear="all">
<div><br></div>-- <br><div dir="ltr"><div>IRC: radix</div>Christopher Armstrong<div>Rackspace</div></div>
<br><br>
</div></div></div></div>