At 4:03 PM +0200 9/24/04, KJ wrote:

So, my question is, why would one need lexical pads anyway (why are they there)?

Pads do three things. First, as has been pointed out, they store sufficient metadata so string evals (that's where code gets compiled on the fly and accesses the surrounding environment) work out properly. It's possible to get around this other ways, but it's a pain.


Secondly, they provide that metadata for introspection, which is also quite nice, albeit of limited utility outside of on the fly compilation.

Third, and most important, they're needed for closures. Without pads of some sort you can't do closures. (They may be called different things, but they're the same)
--
Dan


--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to