On Thu, Aug 5, 2010 at 3:56 AM, Robert Bradshaw
<[email protected]> wrote:
> My one concerns is if (taken to the extreem) having a visitor that
> knows how to generate code for every type (and the requisite
> internals) is preferable to encapsulating this knowledge on a
> node-by-node basis. Perhaps.

Ah yes... the perennial style debate: if you have a bunch of data
types, and a bunch of operations on those types, is it better to group
the code by type, or by operation?  (And of course there's no "right"
answer to such a generic question.)

AFAIK, other compilers (like gcc and LLVM) group code by operation --
I think they would typically have a source file for each compiler
pass, for example.  On the other hand, Cython probably has more node
types (and semantically richer node types), and fewer operations, than
those compilers, so the right answer for them isn't necessarily right
for Cython...

> - Robert

Carl
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to