Monday, January 14, 2013

What's a lexical scope?

A region where some variable can exist (i.e., a scope) defined by the structure of your code (i.e., lexically). For example, in most languages, a function defines a lexical scope; any variable declared inside the function is inaccessible outside of it.
-Eevee  [Source]

I was looking around for some definition for this the other day, ended up defining lexical instead which gave me the general idea.
Found this definition today on stackexchange, reposting here for easy google-ability :-)

No comments:

Post a Comment