Will using be deprecated in Julia 2.0?

I saw this issue in Julia 2.0 milestone. 2.0: just one import keyword · Issue #39235 · JuliaLang/julia · GitHub

I was wondering if using will be deprecated in favor of import in Julia 2.0. If that is the case, I will stop using the using right now.

You shouldn’t stop using using, because you will lose all exports. The proposal does not negate export semantic, so while it is not implemented using is needed, because it has a different meaning compared to import.

Even if that proposal would be considered for 2.0, that is still very far in the future, so there’s no need change your habits now.

Still, I personally like it better to explicitly say what I use already, but you can do that with using A: b anyway. It’s a semantic distinction.

2 Likes

I understand that but the possibility of deprecating using still sounds scary to users like me.

1 Like

One thing to note is that we almost certainly will make upgrading to 2.0 as painless as possible. It seems likely that we’ll have a script that can automatically do the changes from 1.x to 2.0. Also, I wouldn’t be surprised if we end up not changing this. While it obviously would be better to have 1 keyword, breaking changes that don’t solve problems are often not worth fixing.

4 Likes

It depends on the definition of “problem”. If getting rid of using makes the semantics of importing code simpler, then I think it would be worth it. After all this time I still sometimes get confused about the difference between the two and the reasoning behind the design.

2 Likes

Version 2.0 is likely to contain several breaking changes. How will you handle that?

Are you sure you’re not overreacting? It seems like upgrading will be difficult if you’re that change-averse.

2 Likes