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

Add ScopedValues to export list for Base #54556

Closed
wants to merge 1 commit into from

Conversation

CameronBieganek
Copy link
Contributor

This will allow users to type ScopedValues.with without having to do a using or import. (As can be done for Iterators.take and Threads.nthreads, etc.)

This needs to be backported to 1.11, in my opinion.

@nsajko
Copy link
Contributor

nsajko commented May 22, 2024

Why clutter the main namespace? I think Base.ScopedValues is fine.

@LilithHafner
Copy link
Member

LilithHafner commented May 22, 2024

This could be confusing if someone loads the ScopedValues.jl package (e.g. for compat with Julia < 1.11)

@CameronBieganek
Copy link
Contributor Author

Why clutter the main namespace? I think Base.ScopedValues is fine.

Do you think Base.ScopedValues.ScopedValue(x) is fine? Or Base.ScopedValues.with? I think exporting ScopedValues makes sense given that we do the same thing for commonly used modules like Iterators, Threads, and Sys. "Why clutter the namespace?" is an argument that I'm getting tired of hearing. It lacks substance. Why not make ScopedValues convenient and ergonomic to use?

But yeah, the situation with ScopedValues.jl is unfortunate.

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.

3 participants