If you write it imports all bunch of methods into the current scope.
using Plots
plot(rand(5,5))
I need only one method, is it possible to write the same code but without using
or importing anything, I don't want to pollute the current scope with Plots
exports and don't mind to prefix it with package name every time I use it.
Plots.plot(rand(5,5))
import
will bring a module into scope without any of its exported names. You can still use qualified names to reference names within the imported module:
import Plots
Plots.plot(rand(5,5))
To avoid using the qualified name, you can create a binding to a new name:
const plot_from_plots = Plots.plot
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With