-
Notifications
You must be signed in to change notification settings - Fork 107
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
Function redefinition is ignored #16
Comments
It's currently treated as an error to shadow or redefine variables. The message you saw Long-term, I'm not sure what sure what shadowing behavior we want. Error? Warning? Allowed? There are good arguments for each. I lean towards keeping the strict no-shadowing behavior but I admit it's quite annoying in the REPL. |
I think that is a good call. At least for now. |
Very interesting to know about the Julia experience. That sounds like another reason to keep it strict and simple for now. It's easy to liberalize it later if needed. |
Will you be at NeurIPS? The short version of the JuliaLang/julia#265 thing is that if you allow functions to be redefined, So you need to track the locations of all static calls of all functions incase they get redefined; There are maybe other reasons to keep track of backedges. |
Thanks for explaining the recompilation issues. There may be similar issues in Dex's notebook runtime, which only re-evaluates top-level declarations which have changed in the source file, and those that depend on them. Ruling out variable shadowing makes the caching logic quite a bit simpler.
Yes, I'll be there for the workshops. Let's catch up then! |
Fresh build today, using the REPL:
It said it redefined, but it did not
The text was updated successfully, but these errors were encountered: