----- Original Message -----
From: "Glen Knowles" <[EMAIL PROTECTED]>
To: "'Boost mailing list'" <[EMAIL PROTECTED]>
Sent: Monday, December 09, 2002 6:42 PM
Subject: RE: [boost] Formal review: Optional library


> From: Fernando Cacciola [mailto:[EMAIL PROTECTED]]
> >>
> >> * I'm unsure about the presence of "initialized()".  On the one hand,
the
> >> duplication in features (compared to "get/peek() == 0") is something I
> >> think designs should generally avoid.  On the other hand, this name is
> >> more meaningful for what precisely "get/peek() == 0" signifies.  I
guess
> >> I'm +0 on this one.
> >>
> >To be honest, I dislike it too :-)
> >But some people found the alternative spellings ugly,
> >so I figured that a member function would make them happy.
>
> How about using !empty() instead of initialized() ?
>
The problem William was raising is not about the particular name of the
member-function: empty() or initialized(); but about having a(nother)
member-function to do a job which is already covered by other parts of the
interface.
(note that there is no empty() member function in optional<>)

OTOH, whether to have 'empty' or 'initialized'... well, I prefer
'initialized', but that's mainly a matter of personal taste I think.

Fernando Cacciola




_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to