Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-04-27 18:58:33


Maurizio Vitale wrote:
> Eric Niebler <eric_at_[hidden]> writes:
>
>> No, proto::_ is a placeholder. And proto::not_<> can logically negate
>> any grammar, not just proto::_.
>
> FWIW I kind of like proto::_. It gives me warm memories of ML and Haskell patterns
> in the land of...brrr...I digress.
>
> But I'd appreciate if you could elaborate on why you see it as a placeholder.
>
> Technically I guess it is: it certainly takes space in the parse tree, but I tend to
> think about placeholders as things that mark a spot that I can then reference
> from somewhere else (and from here stems my confusion on transformations from
> another thread. This and the fact that mpl lambda placeholders are mentioned in
> the documentation).

I suppose I hadn't thought very hard about what the difference between
the term "placeholder" and "wildcard" might be.

> Now I see proto::_ more like a wildcard pattern that matches anything but doesn't
> have additional meaning (or features for the user).

OK.

> Is there anything I'm missing about proto::_ ?

No, I think you got it. Proto::_ is a wildcard pattern that matches
anything. In the sense that it is never /substituted/ with anything, it
is not a placeholder. I misspoke.

I could rename proto::_ to proto::anything, and that would be more
evocative of its meaning, but I still like proto::_ better.

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk