
Fernando Cacciola wrote:
Joel de Guzman wrote:
The nullability aspect is *besides* the point and has nothing at all to do with the rebinding semantics.
This is 100% false. Is 100% the opposite.
Ok, then we're in trouble.
Rebinding semantics are there _precisely_ and _only_ to solve a problem posed by nullability.
Let me say that again:
Rebinding semantics are there _precisely_ and _only_ to solve a problem posed by nullability.
Sorry, I don't buy that.
So once again, I ask you to deeply consider nullability and the problem it poses on assignment (I hope I don't have to repeat it again), then weight my proposed solution (rebinding) with your expectactions. If possible, propose a better solution or at least show that you don't think the problem is worth a controversial solution like rebinding.
I already proposed a solution: no rebinding, no special cases, do as the structs do. Alas, you don't agree that rebinding and nullability are separate concerns. Oh well... To be honest, it's easier for me to simply use variant than to engage in a battle. Perhaps I am looking at the wrong abstraction. Perhaps what I need is a variant and your optional is not really a variant<T, nil>. But then in that case, you should refrain from calling it as such in your documentation. Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net