-
Notifications
You must be signed in to change notification settings - Fork 7
Lookup Rules #23
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
Comments
My thinking as of now is that only the last (rightmost) item gets imported into scope. |
@skaller wrote:
I'm thinking that import is the wrong way to introduce a package or library, this should be done with a separate command like addLibrary() or library() otherwise you couldn't permit to name a module with the same name in your current project. What is if a library requires you to provide to implement some functions, you will need some builtin support for that in repls. Import statement should only provide aliasing functionality, therefore |
@sighoya wrote:
As long as your module has a different directory prefix (or repository id), then it can be uniquely qualified by the prefix.
I don’t understand this comment. |
You said that importing modules can require the importer to provide some implementations of imported signatures. You said you will handle this in interface files, but how you will handle this in the REPL? |
@sighoya wrote:
Where did write that? |
Maybe I misunderstood it, but you said something like that in connection with strong versus weak modularity. |
@sighoya wrote:
I found the discussion in the Modularity issues thread #39, that you’re referring to and added a new post on that subject. I have never coded a REPL so probably @keean is the one who should comment on your question. |
I hope ppl don't mind but I'm starting a new thread about lookup rules, since the "import discussion" is too long and isn't just about syntax. The right syntax to implement is the simplest most brain dead least capable one to start with, IMHO, then go on from there.
So will someone explain, if I say
what does that do? Does it put X in scope? And nothing else?
What if I say
What symbols are no in scope? Note that in Python, X is in scope, as well as Y. Which is inconsistent.
The text was updated successfully, but these errors were encountered: