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

Scope #137

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Scope #137

wants to merge 4 commits into from

Conversation

MayaGans
Copy link
Collaborator

@MayaGans MayaGans commented Sep 10, 2019

Is a scope figure of interest? I tried to stay on brand but I'm not sure what font you've been using. In this PR I:

  • created basics-scope.svg
  • created basics-scope.pdf
  • followed the format of other figures in my attempt to add it to basics.tex

Screen Shot 2019-09-10 at 1 36 08 PM

Maybe I should add some arrows to show the inside variables can access the global but not the other way around?

@gvwilson gvwilson self-requested a review September 10, 2019 19:19
@gvwilson gvwilson self-assigned this Sep 10, 2019
@gvwilson
Copy link
Collaborator

I think the scope diagram will work better if it shows some actual JavaScript with actual variables with the same and different names, and arrows pointing from uses to definitions.

@gvwilson gvwilson assigned MayaGans and unassigned gvwilson Sep 11, 2019
Copy link
Collaborator

@gvwilson gvwilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented in GitHub: I think we need to show two variables with the same name to show what overrides what - arrows pointing from names to definitions, etc.

@MayaGans
Copy link
Collaborator Author

Figured this may need some input before I add to the PR - let me know what you think of this screen shot (using the function in basics.tex

Screen Shot 2019-09-13 at 10 48 23 AM

@gvwilson
Copy link
Collaborator

I'm liking this, but both high and low point at function-scoped variables - I think we need something pointing at a variable outside the function to make it clear how scope works. In this particular example, though, there aren't any global variables to point at :-/

@MayaGans
Copy link
Collaborator Author

MayaGans commented Sep 13, 2019

Screen Shot 2019-09-13 at 11 18 15 AM

@cRAN-cg
Copy link
Contributor

cRAN-cg commented Oct 2, 2019

image

Hi @MayaGans I use this as a memory map while working with Javascript. Heavily inspired by Will Sentance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants