On Wed, Feb 9, 2011 at 4:45 AM, Jed Brown <span dir="ltr"><<a href="mailto:jed@59a2.org">jed@59a2.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><div class="gmail_quote">On Wed, Feb 9, 2011 at 11:33, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

A single system, with real scoping, easy debugging, more readable code, etc.</blockquote></div><br></div><div>Would you like a pony? What does this even mean? There is logic for a PETSc program to attach a debugger to itself. The details of that logic depends on tests that are run by configure. PETSc does not presently require Python at runtime. If you were to refactor it, where would the logic go and how would it be called from C?</div>

</blockquote></div><br>If you refer to the first part of your comment above, it suggested generating the correct code, and then questioned the utility of doing so:<div><br></div><div><meta charset="utf-8"><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
What does this even mean?</blockquote><div><br></div>  single system: Here I mean using just Python, rather than Python coupled with the awfulness that is the C preprocessor</div><div><br></div><div>  real scoping: Python has nice scopes, rather than the underscore hell of preprocessor names</div>
<div><br></div><div>  easy debugging: I can easily see the code I generated and debug it. This is much more complicated with preprocessor logic</div><div><br></div><div>  readable code: See above</div><div><br></div><div>
I cannot think of an argument for using the preprocessor.</div><div><br></div><div>    Matt<br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
</div>