kidok / protobuf

Automatically exported from code.google.com/p/protobuf
0 stars 0 forks source link

Example protobuf uses required fields #656

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Look at the example protobuf definition on the summary page 
(https://code.google.com/p/protobuf/) or 
http://protobuf.googlecode.com/svn/trunk/examples/addressbook.proto

What is the expected output? What do you see instead?
I thought required fields are Considered Harmful. If so, the sample code should 
not use them.

Original issue reported on code.google.com by hirshlei...@google.com on 16 Jul 2014 at 8:43

GoogleCodeExporter commented 9 years ago
Just show users how to use it, so we covered the basic required, optional and 
repeated. It also helps for the testing of add person and list people. Test 
coverage will reduce a lot if we change required to optional.

Customer should decide to use required or optional themselves.

Original comment by jie...@google.com on 17 Jul 2014 at 7:12

GoogleCodeExporter commented 9 years ago

Original comment by jie...@google.com on 17 Jul 2014 at 7:15