Replies: 5 comments 2 replies
-
|
I don't think there's a technical benefit of one versus the other. The relative one is of course shorter, but besides that I don't think it has significant advantages. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks! |
Beta Was this translation helpful? Give feedback.
-
|
I prefer absolute imports because they are more explicit. I also find them easier to read because names are references with absolute paths, ie using Oceananigans.Fields: AbstractFieldonlyu works if there is a name |
Beta Was this translation helpful? Give feedback.
-
Oh, interesting, in Breeze relative imports seem to be somewhat popular 🙂 |
Beta Was this translation helpful? Give feedback.
-
|
I like relative because it immediately tells me that this is an import from this package somewhere. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm wondering whether in submodules it's better to import via absolute, e.g., like
Oceananigans.jl/src/AbstractOperations/AbstractOperations.jl
Line 11 in b1b07fe
or relative, e.g.,
?
Is there a reason for one vs the other?
cc @giordano
Beta Was this translation helpful? Give feedback.
All reactions