[protobuf] Re: Issue 154 in protobuf: Generate operator =() implementatoin for messages.

2010-01-12 Thread protobuf


Comment #2 on issue 154 by huas.su: Generate operator =() implementatoin  
for messages.

http://code.google.com/p/protobuf/issues/detail?id=154

Thanks for your comments. I think message1.SerializeAsString() ==
message2.SerializeAsString() is acceptable.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.




[protobuf] Re: Issue 154 in protobuf: Generate operator =() implementatoin for messages.

2010-01-12 Thread protobuf


Comment #3 on issue 154 by huas.su: Generate operator =() implementatoin  
for messages.

http://code.google.com/p/protobuf/issues/detail?id=154

Thanks for your comments. I think message1.SerializeAsString() ==
message2.SerializeAsString() is acceptable.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.




[protobuf] Re: Issue 154 in protobuf: Generate operator =() implementatoin for messages.

2010-01-12 Thread protobuf

Updates:
Status: WorkingAsIntended

Comment #1 on issue 154 by ken...@google.com: Generate operator =()  
implementatoin for messages.

http://code.google.com/p/protobuf/issues/detail?id=154

I think you mean operator==().

We intentionally chose not to include comparison, as we find it is rarely  
used
outside of tests and it adds significantly to the generated code size,  
which is

already too big.  Try this instead:
  message1.SerializeAsString() == message2.SerializeAsString()

You could also write code to compare via the reflection interface.  It  
would be kind
of slow but for tests this is irrelevant.  We have some code like this  
which I hope

to release publicly if I can find time to clean it up...

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.