Hey,
I prefer small source code files. Files are modules and therefore splitting a file changes method visibility.
Is it at all possible to have one file:
# file A
struct A{ x : u32}
and another
f(a: A) {
a.x
}
where of course both are exported from some other module, so that the abstraction doesn't leak. Essentially it's possible to have both A
and f
in single module (put into single file), but can I split those into two modules and export from 2 namespaces?
One thing is can I split that into 2 source files.
Second question is can I define A
and f
wherever, but export them from two different namespaces?