2 ms·
Somehow it's nice to have a global namespace so I dont have to remember which libs have "plot()" or "sind()". Nothing beats Matlab/Gnu Octave for me when I jus
by rightbyte 7y ago
Somehow it's nice to have a global namespace so I dont have to remember which libs have "plot()" or "sind()".
Nothing beats Matlab/Gnu Octave for me when I just want to make some quick calculations.
- ddragon 7y agoJulia "default" behavior (the 'using' keyword) is also importing everything (that is exported on the selected module) to the global namespace, using multiple dispatch to safely assign the optimal implementation of each function for each argument set without clashing. It's not unusual in Julia to have one function with more than a hundred implementations, and the user doesn't need to care which one will be chosen. Though you can also use 'import' to keep the namespaces separate.
- ChrisRackauckas 7y agoIt's not really a default though. You have to always choose to do `using` instead of `import`. A lot of people choose `using`, because it's generally more safe than something like MATLAB or Python because of multiple dispatch, but there's nothing in the language that actually defaults to `using` other than the convention of some people.