You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've talked with Manuel and we both agree that the scoping mechanism that is
currently
implemented is broken. There are a number of bugs already submitted that have
to do with the way
that we currently create and search through scopes. We've decided to try to
replace it with what
essentially will be a stack of maps from variable names to the objects they are
bound to.
Original issue reported on code.google.com by [email protected] on 2 Jun 2010 at 2:36
To elaborate more on the semantics of this change, each scoping level will be
represented by a single map in the
stack of maps. Whenever we enter a new scope, we push a new map onto the
stack. Whenever we need to
perform a lookup for a variable name, we search from the top of the stack
downwards, using the first entry that
we find. If we do not find anything, then we throw an error.
This also alleviates some of our issues with lambdas. Whenever we instantiate
a lambda, we make a copy of the
current map and store it with the lambda. That way, the state of the bound
variables in the lambda is essentially
frozen.
Original issue reported on code.google.com by
[email protected]
on 2 Jun 2010 at 2:36The text was updated successfully, but these errors were encountered: