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

Oil could disable dynamic scope and provide explicit syntax to opt-in #716

Closed
andychu opened this issue Apr 17, 2020 · 2 comments
Closed

Comments

@andychu
Copy link
Contributor

andychu commented Apr 17, 2020

Related:


  • for reading, we could have some sigil or prefix?
    • var x = ^outer (prefix ^ is available for use)
    • echo ${^outer}
    • note: this is scope_e.LocalOrGlobalOnly
  • for writing, provide setref, which requires that the variable have the -n nameref flag.
    • note: setting globals is done with setglobal

TODO: make sure functions written in this style compose !!


research:

  • what does Tcl do?
  • what does Perl do?
@andychu
Copy link
Contributor Author

andychu commented May 14, 2021

@andychu
Copy link
Contributor Author

andychu commented Jul 7, 2021

@andychu andychu closed this as completed Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant