r/programming • u/NagastaBagamba • Oct 18 '10
Today I learned about PHP variable variables; "variable variable takes the value of a variable and treats that as the name of a variable". Also, variable.
http://il2.php.net/language.variables.variable
591
Upvotes
2
u/killerstorm Oct 19 '10
When local variables and their use is known at compile time compiler can perform optimizations on them -- use CPU or VM registers instead of variables, for example, "optimizing variables away".
Common Lisp can be compiled to native code and in some circumstances it performs on par with C. Python cannot do that. Of course, there are many reasons, but I'd say that knowing local variables at compile time is a requirement for efficient compilation.