Hello,
I've been wondering for some time about this, so I thought, why not ask.
The thing is, I've been playing a few times with (Parrot, but also .NET)
compilers, and my conclusion was that the most difficult part is getting assignments
right (when by value, when by ref, etc.). (that is, any construct, such as while, is
only a set of labels, the most important thing is assignments. Even translating
function calls are easier than assignments).
Anyway, when one creates a simple language, compiling local variables
can easily be done through PIR's ".local" syntax. However, when assigning to
locals, you're really just assigning to registers, not actually storing
variables in local pads. (and when registers run out, they're being spilled
to an array in P31, right?).
So, my question is, why would one need lexical pads anyway (why are they there)?
Klaas-Jan