Open crusso opened 4 years ago
Actually, I'm now wondering if it would in fact be better to just uniformly call these Type, (Word32.Type etc.) to avoid the circularity, redundant Word32.Word32 and in anticipation of functors. @rossberg @nomeata @matthewhammer
motoko's special mo:prim to export all primitive types under their own name
That seems reasonable and non-intrusive
Hm, I'm sceptical. IME, it is more cryptic and less natural to most folks, and it gets in the way of import {...} = "..."
(which we should add). OTOH, functors are not going to be relevant for Motoko anytime soon. And: not even SML does it. ;)
I remember a discussion on TC39, where some folks argued that this pattern demonstrates why ML modules are a practical failure...
What are you sceptical about? Exporting Int.Type
, Int.Int
or anything at all?
@nomeata, I mean Int.Type.
Fine, I'll go for the prim extension and add eponymous type components. We can always add *.Type later if it ever becomes useful
To avoid cylic definitions, requires a cycle breaking Types.mo (useful anyway) or motoko's special mo:prim to export all primitive types under their own name.