import this
import that
import other
import this, that, other
import
this, that, other
import std/[this, that, other]
Something else?
IMO, there are languages designed to limit the number of ways of express things. Those languages are usually intended to be used in enterprise environment, so that everyone somehow write syntactically same code.
Nim, on the other hand, is more indie, more free style. All your examples are valid expressions to import modules.
Sure they're valid. In python both:
import this, that, other
import this that other
are valid but pep-8 guidelines encourage the latter for explicitness. My question was whether there is similarly a preferred way of importing in Nim.
I tend to block imports as scope.
import std/[a, b, c]
import thing, thingA, thingB # Local Scope
import somepackage/[a,b,c] # From a package
I love the block syntaxes in Nim, so what I do is this:
import
first, second, third,
a, b,
c, d
Everything is neatly sorted, but there's no visual clutter which would be there if everything was prefixed with an import statement.
Usually I put standard library stuff first.