Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2001-05-24 22:13:57

On Thursday 24 May 2001 10:43 pm, you wrote:
> Yes, very subjective. I still have a strong opinion towards retaining the +
> closure
> and the * kleene star. These are used very often and I don't want to type
> repeat<n>(a) many times. I just want to do *a.
> Look at it this way. C uses the * for multiplication (infix) and pointer
> deref
> (prefix). If they (the original authors) though that this will be
> confusing, they
> would have used something like deref(ptr) instead. Would you have wanted
> that?
> I'd like to propose changing >> to +, keeping the prefix +, * and adding
> an iterator.
> Joel de Guzman

This is one of those reasons that many are against operator overloading. I
agree that "+" is better than ">>" for concatenation, only because there is
precedent for such abuse in the standard.

However, the prefix + and * are doubly bad. The overloaded meanings have
absolutely nothing to do with the original meanings of either operator and,
perhaps worse, it doesn't conform to the syntax used in theoretical language
applications either. Essentially the syntax conforms to neither C++ nor the
domain it is intended to model, and I think that will become overly


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