On Fri, May 31, 2019 at 11:10 AM Prasanth Somasundar <[email protected]>
wrote:

> >    Actual line of code from Cloudflare Workers:
> >    case PipelineDef::Stage::Worker::Global::Value::JSON:
> >    So again, I'm not sure this is a problem specific to certain
> languages.
> >    :)
>
> Oof, point taken. Slightly off topic for this list, but how would you
> feel about accepting (wire compatible) patches to the sandstorm schema
> to flatten the namespace? Here's another doozy (from the output of the
> go code generator):
>
>     websession.WebSession_WebSocketStream_sendBytes_Results_Future
>
> That's pretty bad in both cases. However, in C++, you get the benefit of
> using declarations on namespaces and classes, so if you wished, you could
> do something like:
>
> using Global = Pipeline::Stage::Worker::Global;
>
> case Global::Value::JSON:
>
> I can say from experience writing quite a bit of C++ code that consumed
> protobufs that this was the only thing that made it look sane.
> Unfortunately, if we use function name based namespacing (if you want to
> call it that), we cannot get this benefit easily as you'd have to rename
> all the functions consistently and on an ad-hoc basis.
>
> With Elm and Haskell, I believe the only layer of namespacing that's
> provided is the module name which is why both Ian and I gravitated to it
> initially.
>

Are you saying Elm and Haskell don't provide any way to declare aliases?
That seems surprising to me.

-Kenton

-- 
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/CAJouXQnzXxE%2BEb9THXD0br_Q41BNMJZ%3D%2BAcGX4Cb%3DpkAgzRoEg%40mail.gmail.com.

Reply via email to