<div class="gmail_quote">On Mon, Dec 6, 2010 at 19:53, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":1mb">Worse comes to worse I put it back (but better next time :-).<br></div></blockquote><div><br></div><div>Apparently this can done purely with headers (no need to touch all the source files) and (uglier in my opinion, but still possible) with a pragma to push and pop the visibility state (C99 at least has _Pragma, it's dirtier to need #pragma (of course wrapped based on a configure test)).  This makes it a much simpler issue to "put back, but better" if needed.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div id=":1mb">
  Actually I think handling these "things" with CPP is not the way to go, in fact, I'd like to see, if possible, almost no use of CPP in PETSc source. Reason: PETSc source code currently is the combination of two relatively simple but very different, languages CPP and C. Doing source to source manipulations on this beast is a nightmare because one cannot even parse CPP plus C. If we eliminate the CPP then it becomes only C which we parse and manipulate relatively easily, this opens up enormous opportunities for a whole new approach to code development we do not have currently and cannot have with a CPP plus C code base. Of course, I could be totally on the wrong track but I won't know without investigation.<br>
</div></blockquote><div><br></div><div>Clang/LLVM can parse the C with everything in it, then give you the AST or whatever intermediate form you like.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":1mb">
  Honestly I am sick of having this big code base where making changes means editing flat files and manually changing source code, I thinking that model really needs to change. I don't really know how to change the model but I really want to see if change and if that involves going down some wrong roads that is ok with me, better than not trying things.</div>
</blockquote></div><br><div>Sounds like you should switch to Smalltalk.</div><div><br></div><div>Jed</div>