<div class="gmail_quote">On Tue, Dec 4, 2012 at 8:37 AM, Barry Warsaw <span dir="ltr"><<a href="mailto:barry@python.org" target="_blank">barry@python.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Dec 03, 2012, at 02:29 PM, Larry Hastings wrote:<br>
<br>
>4) Builtin function arguments are defined in a small DSL; these<br>
>    are expanded to code and data using a custom compile-time<br>
>    preprocessor step.<br>
><br>
>All the core devs I've asked said "given all that, I'd prefer the<br>
>hairy preprocessor macros".  But by the end of the conversation<br>
>they'd changed their minds to prefer the custom DSL.  Maybe I'll<br>
>make a believer out of you too--read on!<br>
<br>
</div>The biggest question with generated code is always the effect on debugging.<br>
How horrible will it be when I have to step through argument parsing to figure<br>
out what's going wrong?<br></blockquote><div><br>That's the advantage of the Cog-style approach that modifies the C source files in place and records checksums so the generator can easily tell when the code needs to be regenerated, either because it was changed via hand editing or because the definition changed. Yes, it violates the guideline of "don't check in generated code", but it makes debugging sane.<br>
<br>Cheers,<br>Nick.<br clear="all"></div></div><br>-- <br>Nick Coghlan   |   <a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>   |   Brisbane, Australia<br>