by agumonkey · 7y ago · 0 comments
http://luthaf.fr/julia-some-criticism.html
I think that these issues are generally acknowledged although I don't know if they will be addressed. Seems like major pain points for library development should have been addressed before 1.0.
It really is not:
* `from package import <star>` is more work than `import package`, `using` is shorter than `import`
* the official documentation Python documentation starts with qualified imports, then introduces local bindings, and finally unqualified imports, opening a few doc pages imports are either fully qualified or explicitly bound; the first occurrence of using a non-prelude package in Julia's tutorial is `using`[0] and the modules documentation explains `using` first
The official Julia documentation very specifically steers the reader towards unqualified imports as the default & proper way to do things, Python's does the opposite.
[0] https://docs.julialang.org/en/v1/manual/functions/#Optional-...
edit: oh for fuck's sake I hate hn's shitty brain-dead pseudo-markup.
By one letter!
And in the right direction: for trying things out interactively, `using ThePackage` and then having everything available is great.
Then once you know what you want to do, in more careful code you can switch to `import` and qualify more things, and your future self with thank you.
But serving both of these needs seems like a valid design goal. I'm not sure the manual does a great job of explaining this right now, import vs. using also changes the rules around adding methods to functions, and it is perhaps more confusing than it has to be.
I'll need to take another look at the code I was working on. I was planning on doing so after a break anyway.