Re: [capnproto] enum brands?

2020-10-30 Thread 'Kenton Varda' via Cap'n Proto
I probably did it for consistency. It's true that, at least at present,
it's not in any way meaningful for an enum to be parameterized. Moreover,
you cannot declare parameters in an enum declaration. However, an enum
could be nested within a parent scope that is parameterized, and in theory
everything within the scope is subject to those parameters -- but indeed,
since an enum type has no opportunity to refer to any parameter in its
definition, it is meaningless in practice.

-Kenton

On Fri, Oct 30, 2020 at 2:41 PM Ian Denhardt  wrote:

> Hey all,
>
> I was looking at schema.capnp, and noticed that the enum variant of the
> Type struct has a brand field. This doesn't make sense to me: unless I'm
> missing something, enums can't contain pointers, so it doesn't make
> sense to have type parameters on an enum. What is this field for?
>
> -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 capnproto+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/capnproto/160408690654.5900.1088050232156870835%40localhost.localdomain
> .
>

-- 
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 capnproto+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/CAJouXQ%3DQBc4BFqXQWmK4tuJRZVrHPA0qz1dhN_eVXFOoLQEG7g%40mail.gmail.com.


[capnproto] enum brands?

2020-10-30 Thread Ian Denhardt
Hey all,

I was looking at schema.capnp, and noticed that the enum variant of the
Type struct has a brand field. This doesn't make sense to me: unless I'm
missing something, enums can't contain pointers, so it doesn't make
sense to have type parameters on an enum. What is this field for?

-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 capnproto+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/160408690654.5900.1088050232156870835%40localhost.localdomain.