Boost logo

Boost :

From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2005-10-13 11:43:54

Joel de Guzman wrote:
> Fernando Cacciola wrote:
>> Hi Joel,
>> I don't know what 'eps' is for so I can't follow the equivalence
>> between "!a" and "a|eps"
> eps is an epsilon match: matches the null string.
>> Nevertheless, I can see that if optional<A> MUST be equivalent to
>> variant<A,nil>; _and_ variant<T&,nil> doesn't rebind, then neither
>> should optional<T&>.
>> But to complete the argument we would need to show that
>> (1) optional<A> MUST be equivalent to variant<A,nil>
>> Only if (1) holds.
>> Can you show with a solid argument that (1) _shall_ hold?
> I thought I just did! Oh my...

Well, I think you shown that the equivalence works in your case.
I wonderder if there could be _argued_ strongly that the best possible
design ever is for optional<T> to follow _exactly_ the semantics of
Is not that I disagree with that.. is that I don't feel like simply
chanching sides, because then I will have to be arguing not with you but
with the guy next door.. I want an argument as solid as possible for
whatever decision I made.

> I'm getting tired with this.

It could help if you voiced your opinion on the problems posed by your model
(that is, that the effect of assignment would depend on the lvalue being
absent or not). The only thing I heard from you on this point since I
raised it for the first time years ago was "it doesn't look good, right". If
this problem had not existed we wouldn't be having this discussion. The only
way out I see is to figure out how to weight the problems and cons of each
model. Simply restating the cons of one of them isn't enough.

Anyway, I'm preparing a post for c.s.cpp so we can continue there.


Fernando Cacciola

Boost list run by bdawes at, gregod at, cpdaniel at, john at