Re: [protobuf] Enum values are siblings of their type, not children of it.

2010-08-25 Thread alopecoid
this change without updating millions of lines of existing C++ code that uses protobuf enums? On Fri, Aug 20, 2010 at 11:12 AM, alopecoid alopec...@gmail.com wrote: Hi, This post is about the fact that protobuf enum values use C++ scoping rules, meaning that, unlike in Java, enum values

[protobuf] Concatenation of adjacent strings in text-formated protobuf message (Java API)

2009-10-30 Thread alopecoid
Hi, Using the Java API, when attempting to parse a text-formatted protobuf message that contains adjacent strings that are meant to be concatenated, such as in the following contrived example: name:John Smith profession:mailman description: all these strings are concatenated

Can serialized messages be used reliably as keys?

2009-09-29 Thread alopecoid
Hi, Can serialized messages be used reliably as keys? In other words, is it guaranteed that... - Two equal messages will always generate equal byte sequences? (Are fields always written in the same order?) - Two unequal messages will always generate unequal byte sequences? (Are tag

Re: Java deserialization - any best practices for performances?

2009-07-23 Thread alopecoid
Hi, I haven't actually used the Java protobuf API, but it seems to me from the quick occasional glance that this isn't entirely true. I mean, specifically in response to the code snippet posted in the original message, I would possibly: 1. Reuse the Builder object by calling its clear() method.

Re: Java deserialization - any best practices for performances?

2009-07-23 Thread alopecoid
Hi Kenton, Thanks for your reply. You can't continue to use a Builder after calling build(). Even if we made it so you could, it would be building an entirely new object, not reusing the old one. We can't make it reuse the old one because that would break the immutability guarantee of