From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2004-11-19 01:38:46
> -----Original Message-----
> [mailto:boost-bounces_at_[hidden]] On Behalf Of David Abrahams
> > Can this be fixed?
> I seriously doubt it. The fact that you can't represent an
> empty SEQ is a known limitation that Paul would have avoided
> had it been possible.
It *is* possible, but the solution is undesirable. Such a thing as a nil
sequence exists conceptually as an empty sequence of preprocessing tokens. We
don't yet have the means to pass that around in C++.
The way to do it is to make (e.g.) NIL symbolically represent a nil sequence.
However, that functionality, which is only a temporary hack, produces other
limitations. Nor would it help in Brent's situation. In fact, the hack would
interfere even more because it destroys the ability to append sequences simply
by placing them adjacently. E.g. if 'seq' is "(a)" then "(HEAD(seq)) TAIL(seq)"
!= 'seq'. Rather, it is "(a) NIL". Dealing with this situation requires an
awful lot of NIL-checking. (Allowing benign NIL symbols in the middle of
sequences would be *way* worse.) On the contrary, true nil sequences (ala C99)
suffer none of those problems.
Thus, without placemarkers (empty arguments) I had to choose between two evils.
The choice was made to live with the limitation until we have the real thing.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk