On Wed, Aug 18, 2010 at 7:07 AM, Jeff Plaisance <jeffplaisa...@gmail.com>wrote:

> It seems like the issue here is that optional has been overloaded to mean
> two different things:
>
> 1) Not really optional but in order to do rolling upgrades we're making it
> optional.  The default should be used if it is not set.  In my opinion, in
> this case there should be no "has" method because either its result is
> irrelevant or it is being used to overload some other meaning on top of
> optional.
> 2) Optional in the sense of Option, Maybe, Nullable, empty, can be null,
> whatever you want to call it.  In my opinion this should be encapsulated in
> the type so that the programmer is forced to handle all possible cases.  The
> has method should not be used for this because it is too easy to ignore.
>

Yes, I think you're right, and I see how it makes sense to distinguish these
two by the presence or absence of an explicit default value.

-- 
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.

Reply via email to