Quoting Prasanth Somasundar (2019-06-01 23:12:20)

> What about just dumping everything into the same module, but without
> the prefixed namespace for every value/type/type constructor. The
> reason that we're prefixing everything with underscores is to avoid
> name collisions, but we can simply error on those while still giving
> users `$Elm.overrideName` to allow a user to manually resolve
> collisions.

I like this, though I might suggest still prefixing data constructors
(at least with the type name, not necessarily the whole path), as it's
pretty common to have overlapping names for union members, which would
cause reasonably frequent conflicts.  I've found having *one* level of
name spacing like this for the Haskell implementation isn't too bad.

I toyed at one point with the idea of having the code generator
automatically chop off as many layers of nesting as it could without
causing collisions, though that's a bit more complicated to implement.

-Ian

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/capnproto.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/155944587702.13956.3034908980658521522%40localhost.localdomain.

Reply via email to