> I like this
Cool

> 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.

I thought about this myself, but the biggest issue I have with it isn't the 
technical challenge, but the UX challenge. This would mean that if you ever 
added the wrong name to a schema file, you could end up changing most if not 
all of the names in the file. That sounds really rough to impose and is 
basically a showstopper for me.

--Prasanth

-----Original Message-----
From: Ian Denhardt <[email protected]> 
Sent: Saturday, June 1, 2019 8:25 PM
To: 'Kenton Varda' via Cap'n Proto <[email protected]>; David Renshaw 
<[email protected]>; Kenton Varda <[email protected]>; Prasanth 
Somasundar <[email protected]>; Prasanth Somasundar <[email protected]>
Subject: RE: [capnproto] Cap'n Proto for Elm

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/BYAPR11MB259904C8B85E0B51169A7816C51B0%40BYAPR11MB2599.namprd11.prod.outlook.com.

Reply via email to