Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a note on scope lookup #1432

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@deepakcdo
Copy link

deepakcdo commented Mar 3, 2019

Yes, I promise I've read the Contributions Guidelines (please feel free to remove this line).

deepakcdo added some commits Mar 3, 2019

Update ch1.md
 I think a Russian doll is better analogy of scope lookup than a building
Update ch1.md
 I think a Russian doll is better analogy of scope lookup than a building

You resolve LHS and RHS references by looking on your current floor, and if you don't find it, taking the elevator to the next floor, looking there, then the next, and so on. Once you get to the top floor (the global *Scope*), you either find what you're looking for, or you don't. But you have to stop regardless.
You resolve LHS and RHS references by looking on your current floor, and if you don't find it, taking the elevator to the next floor, looking there, then the next, and so on. Note that LHS And RHS references and not checked in the other flats on the same level, just upwards. Once you get to the top floor (the global *Scope*), you either find what you're looking for, or you don't. But you have to stop regardless.

This comment has been minimized.

@getify

getify Mar 3, 2019

Owner

I do not understand what is being said here?

This comment has been minimized.

@deepakcdo

deepakcdo Mar 3, 2019

Author

In your diagram you have several flats/apartments ( white boxes) at each floor. I just thought the reader will presume the reference lookup will check each apartment on the floor. But I think you are saying just the floor is checked. Or another way of showing that is to update the diagram to only have only one apartment ( white box) per floor in the building.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.