Re: [protobuf] typedef support

2017-04-05 Thread Timothee Cour
I was also looking for typedef in .proto and landed here.
Seems like an obvious feature to have.


On Wednesday, January 18, 2017 at 9:09:00 PM UTC-8, Arpit Baldeva wrote:
>
> Hi Adam,
>
> Thanks for the response. I agree that any change should be scrutinized and 
> evaluated very carefully. 
>
> I am somewhat surprised though. May be it has to do with my primary 
> language background being C++ where typedefs are commonplace. Defining a 
> new message just to embed a single value will work but is cumbersome. 
> Nonetheless, I'll file the issue for further feedback.  
>
> Sincerely,
> Arpit  
>
> On Wed, Jan 18, 2017 at 10:59 AM, Adam Cozzette  > wrote:
>
>> Arpit, I should just let you know in advance that we tend to be pretty 
>> conservative about making a big change like this and so we would probably 
>> be reluctant to do it unless it has a major positive impact. I'm skeptical 
>> of whether this feature adds enough value, because most of the time I think 
>> developers already solve this issue by defining new message types and 
>> reusing them as submessages. Feel free to file an issue, though, if you 
>> think you can make a good argument for why the feature is worth it.
>>
>> On Tue, Jan 17, 2017 at 3:29 PM, Arpit Baldeva > > wrote:
>>
>>> Should I file a GitHub issue for this? I am not sure what the right 
>>> protocol is. 
>>>
>>> Thanks. 
>>>
>>> On Wednesday, November 23, 2016 at 1:04:07 PM UTC-8, Arpit Baldeva wrote:

 Thanks for the info. Typedef support would be pretty much useful for 
 regular use cases in C/C++ languages. For example, if we have 100 messages 
 that each have a game id, it'd be nice to just typedef say a uint64 to 
 GameId rather than using it explicitly in each place. This avoids errors 
 like someone using int64 accidentally in one of the messages. Another 
 example would be typedef-ing a collection like map or repeated fields 
 which 
 are used in multiple messages. 

 --Arpit

 On Wed, Nov 23, 2016 at 11:24 AM, Adam Cozzette  wrote:

> I don't think we have any specific plans to do this, but we could 
> consider doing at some point if it would be useful. Do you have a 
> particular use case that would benefit from support for type aliasing?
>
> On Mon, Nov 21, 2016 at 4:13 PM, Arpit Baldeva  > wrote:
>
>> Hi,
>>
>> Are there any plans to introduce typedef support in the Proto files?
>>
>> Thanks
>> Arpit
>>
>> -- 
>> 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 protobuf+u...@googlegroups.com .
>> To post to this group, send email to prot...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/protobuf.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
 -- 
>>> 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 protobuf+u...@googlegroups.com .
>>> To post to this group, send email to prot...@googlegroups.com 
>>> .
>>> Visit this group at https://groups.google.com/group/protobuf.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


Re: [protobuf] typedef support

2017-01-18 Thread Arpit Baldeva
Hi Adam,

Thanks for the response. I agree that any change should be scrutinized and
evaluated very carefully.

I am somewhat surprised though. May be it has to do with my primary
language background being C++ where typedefs are commonplace. Defining a
new message just to embed a single value will work but is cumbersome.
Nonetheless, I'll file the issue for further feedback.

Sincerely,
Arpit

On Wed, Jan 18, 2017 at 10:59 AM, Adam Cozzette 
wrote:

> Arpit, I should just let you know in advance that we tend to be pretty
> conservative about making a big change like this and so we would probably
> be reluctant to do it unless it has a major positive impact. I'm skeptical
> of whether this feature adds enough value, because most of the time I think
> developers already solve this issue by defining new message types and
> reusing them as submessages. Feel free to file an issue, though, if you
> think you can make a good argument for why the feature is worth it.
>
> On Tue, Jan 17, 2017 at 3:29 PM, Arpit Baldeva  wrote:
>
>> Should I file a GitHub issue for this? I am not sure what the right
>> protocol is.
>>
>> Thanks.
>>
>> On Wednesday, November 23, 2016 at 1:04:07 PM UTC-8, Arpit Baldeva wrote:
>>>
>>> Thanks for the info. Typedef support would be pretty much useful for
>>> regular use cases in C/C++ languages. For example, if we have 100 messages
>>> that each have a game id, it'd be nice to just typedef say a uint64 to
>>> GameId rather than using it explicitly in each place. This avoids errors
>>> like someone using int64 accidentally in one of the messages. Another
>>> example would be typedef-ing a collection like map or repeated fields which
>>> are used in multiple messages.
>>>
>>> --Arpit
>>>
>>> On Wed, Nov 23, 2016 at 11:24 AM, Adam Cozzette 
>>> wrote:
>>>
 I don't think we have any specific plans to do this, but we could
 consider doing at some point if it would be useful. Do you have a
 particular use case that would benefit from support for type aliasing?

 On Mon, Nov 21, 2016 at 4:13 PM, Arpit Baldeva 
 wrote:

> Hi,
>
> Are there any plans to introduce typedef support in the Proto files?
>
> Thanks
> Arpit
>
> --
> 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 protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to protobuf@googlegroups.com.
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>


>>> --
>> 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 protobuf+unsubscr...@googlegroups.com.
>> To post to this group, send email to protobuf@googlegroups.com.
>> Visit this group at https://groups.google.com/group/protobuf.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


Re: [protobuf] typedef support

2017-01-17 Thread Arpit Baldeva
Should I file a GitHub issue for this? I am not sure what the right 
protocol is. 

Thanks. 

On Wednesday, November 23, 2016 at 1:04:07 PM UTC-8, Arpit Baldeva wrote:
>
> Thanks for the info. Typedef support would be pretty much useful for 
> regular use cases in C/C++ languages. For example, if we have 100 messages 
> that each have a game id, it'd be nice to just typedef say a uint64 to 
> GameId rather than using it explicitly in each place. This avoids errors 
> like someone using int64 accidentally in one of the messages. Another 
> example would be typedef-ing a collection like map or repeated fields which 
> are used in multiple messages. 
>
> --Arpit
>
> On Wed, Nov 23, 2016 at 11:24 AM, Adam Cozzette  
> wrote:
>
>> I don't think we have any specific plans to do this, but we could 
>> consider doing at some point if it would be useful. Do you have a 
>> particular use case that would benefit from support for type aliasing?
>>
>> On Mon, Nov 21, 2016 at 4:13 PM, Arpit Baldeva  
>> wrote:
>>
>>> Hi,
>>>
>>> Are there any plans to introduce typedef support in the Proto files?
>>>
>>> Thanks
>>> Arpit
>>>
>>> -- 
>>> 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 protobuf+unsubscr...@googlegroups.com.
>>> To post to this group, send email to protobuf@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/protobuf.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


Re: [protobuf] typedef support

2016-11-23 Thread Arpit Baldeva
Thanks for the info. Typedef support would be pretty much useful for
regular use cases in C/C++ languages. For example, if we have 100 messages
that each have a game id, it'd be nice to just typedef say a uint64 to
GameId rather than using it explicitly in each place. This avoids errors
like someone using int64 accidentally in one of the messages. Another
example would be typedef-ing a collection like map or repeated fields which
are used in multiple messages.

--Arpit

On Wed, Nov 23, 2016 at 11:24 AM, Adam Cozzette 
wrote:

> I don't think we have any specific plans to do this, but we could consider
> doing at some point if it would be useful. Do you have a particular use
> case that would benefit from support for type aliasing?
>
> On Mon, Nov 21, 2016 at 4:13 PM, Arpit Baldeva  wrote:
>
>> Hi,
>>
>> Are there any plans to introduce typedef support in the Proto files?
>>
>> Thanks
>> Arpit
>>
>> --
>> 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 protobuf+unsubscr...@googlegroups.com.
>> To post to this group, send email to protobuf@googlegroups.com.
>> Visit this group at https://groups.google.com/group/protobuf.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


Re: [protobuf] typedef support

2016-11-23 Thread 'Adam Cozzette' via Protocol Buffers
I don't think we have any specific plans to do this, but we could consider
doing at some point if it would be useful. Do you have a particular use
case that would benefit from support for type aliasing?

On Mon, Nov 21, 2016 at 4:13 PM, Arpit Baldeva  wrote:

> Hi,
>
> Are there any plans to introduce typedef support in the Proto files?
>
> Thanks
> Arpit
>
> --
> 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 protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to protobuf@googlegroups.com.
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.