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

Don't export @set #115

Closed
jariji opened this issue Aug 30, 2024 · 1 comment
Closed

Don't export @set #115

jariji opened this issue Aug 30, 2024 · 1 comment

Comments

@jariji
Copy link

jariji commented Aug 30, 2024

OhMyThreads.@set is pretty niche functionality and it clashes with Accessors.@set. Currently it's exported, would it be okay to not export it?

@carstenbauer
Copy link
Member

carstenbauer commented Aug 31, 2024

It's not at all niche if you use the @tasks macro API.

I would recommend that you only explicitly import/using the bits that you need (e.g. using OhMyThreads: tmapreduce) rather then just doing using OhMyThreads.

While the simple using X is, unfortunately, very common in Julia codes, it is quite generally an anti-pattern that doesn't scale well. (Any export that a package might add over time could break your code, because clashes like the one you mention here could occur.)

@carstenbauer carstenbauer closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2024
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

No branches or pull requests

2 participants