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

Export @optlevel - Update exports.jl #51568

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PallHaraldsson
Copy link
Contributor

No description provided.

@PallHaraldsson PallHaraldsson marked this pull request as draft October 3, 2023 16:23
@vchuravy
Copy link
Member

vchuravy commented Oct 3, 2023

Why would we export from Base something that is explicitly in Base.Experimental?

julia> Base.@optlevel
ERROR: LoadError: UndefVarError: `@optlevel` not defined
in expression starting at REPL[1]:1

julia> Base.Experimental.@optlevel
ERROR: LoadError: MethodError: no method matching var"@optlevel"(::LineNumberNode, ::Module)

@PallHaraldsson
Copy link
Contributor Author

PallHaraldsson commented Oct 3, 2023

Before this is merged, I'm guessing, not sure this is enough, I would like to know if both of these should be exported:
Base.Experimental.@optlevel
Base.Experimental.@max_methods 1

@optlevel is already available for years, in all currently supported versions, and it seems strange that people should use Experimental, or fair it is going away if it will not.

On the other hand, I'm thinking maybe this annotation is getting less important over time, actually possibly useless already with code precompiled to native code, already? So I want that discussion also, maybe it should rather go away (be changed to a noop)?

EDIT: I would need to make Base.@optlevel available first... it's a question, should it be available as such, or as @optlevel (I very much doubt that would conflict with real-world code out there).

One other question, even if @optlevel is getting redundant, where it is meant for, for packages, I would really like if using at the calling site were possible, would that make sense? Then a brand-new concept, and might need to be Experimental, after all, (I'm not sure how easy it would be to implement).

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.

2 participants