We do not support typedefs in protobuf. We would like proto APIs to be as 
consistent as possible between languages, so we would not add a feature 
that is so C/C++ specific. If we were to do something like this, it would 
be a more generic version of type aliasing. See this thread 
<https://github.com/protocolbuffers/protobuf/issues/3521> for a 
conversation about support for type aliasing.
On Wednesday, January 26, 2022 at 2:45:03 PM UTC-8 [email protected] 
wrote:

> Hi, 
> I'd like to define a typedef as in C/C++, e.g:
> typedef list<double> DoubleVector 
>
> How can I declare that in a proto3 file ?  
>
> I know I can use:
> message ListOfDouble {
>  repeated double value = 1;
> }
>
> But I'd like not to use that if possible in order to have a container of 
> some type.
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/08fb7d8b-7c30-47b3-a832-6ed713f72a08n%40googlegroups.com.

Reply via email to