--- Comment #6 from David Simcha <> 2009-11-01 12:36:22 PST ---
> > 3.  The mixin is because I needed a lot of the same logic in realloc() and
> > extend() and it was complicated enough that I felt it was the lesser of two
> > evils to use a mixin, even with the "variables appearing out of nowhere" 
> > magic,
> > rather than duplicate that logic.
> Sure, duplicating code is never a good idea. The question is, why it can't be
> done with a plain-old function?

Because I needed to dump a whole bunch of variables (not just 1) into the stack
frames of realloc() and extend() and the only way this could have been done
with a plain old function would be to create a struct, create a function that
returns the struct, etc. or to use lots and lots of out paramters.  I really
felt the mixin was the least unclear way that this logic could be injected into
both extend() and realloc().

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to