2.0: just one import keyword
I would very much like to have just one import keyword in Julia 2.0. I don't much care if it's `import` or `using` but since we talk about it as "importing" things, that may be more natural. With https://github.com/JuliaLang/julia/issues/39187 and some requirement for explicitly requesting extension of external generic functions, this would be possible. | current form | new form | comment | |---|---|---| | `import Foo` | `import Foo` | just imports `Foo` | | `import Foo: Foo, bar` | `import Foo: bar` | in 2.0 `import Foo: bar` imports `Foo` also | | `import Foo: bar` | `import Foo as _: bar` | use `Foo as _` to discard that name | | `using Foo` | `import Foo...` | | | `using Foo` | `import Foo: ...` | longer version of the previous one | | `using Foo; using Foo: bar` | `import Foo: bar, ...` | implicit and explicit imports on one line | | `using Foo as _` | `import Foo as _: ...` | use `Foo as _` to discard that name | In 2.0 I think we should eliminate the distinction between the "soft binding" that `using` creates and the hard binding that `import` creates and just make all explicit bindings hard and all implicit bindings soft: if you asked for it by name, it's a hard binding, if you didn't, it's a soft binding. When someone wants to extend an implicitly imported generic function, they have to fully qualify it.
Posted by StefanKarpinski on Jan 13, 2021, 8:11 PM
Tags
Related issues
- [Meta] Feedback on granular control over Copilot changes
- unexpected status 401 Unauthorized issue
- [MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
- [CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
- Video stops playing after some minutes
- [MODEL] Claude verbose code comments by default — ignores instructions to stop.
Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments
github (Software)
[Meta] Feedback on granular control over Copilot changes
unexpected status 401 Unauthorized issue
[MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
[CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
Video stops playing after some minutes
[MODEL] Claude verbose code comments by default — ignores instructions to stop.
Scope Codex VS Code chats to the current workspace/project
Update on "Co-authored-by: Copilot" in commit messages
2.0: just one import keyword
I would very much like to have just one import keyword in Julia 2.0. I don't much care if it's `import` or `using` but since we talk about it as "importing" things, that may be more natural. With https://github.com/JuliaLang/julia/issues/39187 and some requirement for explicitly requesting extension of external generic functions, this would be possible. | current form | new form | comment | |---|---|---| | `import Foo` | `import Foo` | just imports `Foo` | | `import Foo: Foo, bar` | `import Foo: bar` | in 2.0 `import Foo: bar` imports `Foo` also | | `import Foo: bar` | `import Foo as _: bar` | use `Foo as _` to discard that name | | `using Foo` | `import Foo...` | | | `using Foo` | `import Foo: ...` | longer version of the previous one | | `using Foo; using Foo: bar` | `import Foo: bar, ...` | implicit and explicit imports on one line | | `using Foo as _` | `import Foo as _: ...` | use `Foo as _` to discard that name | In 2.0 I think we should eliminate the distinction between the "soft binding" that `using` creates and the hard binding that `import` creates and just make all explicit bindings hard and all implicit bindings soft: if you asked for it by name, it's a hard binding, if you didn't, it's a soft binding. When someone wants to extend an implicitly imported generic function, they have to fully qualify it.
Comments (0)
No comments yet. Start the discussion.