Suppose Julia distinguished between private and public attributes
struct Foo @public u a b end
so that public access
x.u was allowed but access to private attributes from outside the module needed
getprivate(x, :a) @privates x.a + x.b
I think this could be nice for distinguishing public from private API.
My question is: could this help the compiler make optimizations, since it could tell statically that I’m not accessing any private properties?