There's nothing wrong in this in my opinion. It just means that `T` is an
opaque type. You can get it from exported functions, and pass it to other
exported functions, but you can't create one yourself or manipulate one without
using one of the functions in the module that exports it. I would even say that
this is a useful pattern.
For instance the following works:
#dep.nim
type T = object
x: int
proc makeT*(x: int): T = T(x: x)
proc printT*(t: T) =
echo t.x
Run
and then
import dep
let t = makeT(12)
printT(t)
Run
but the following does not compile
import dep
let t = T(x:12)
Run