Boost logo

Boost :

Subject: Re: [boost] Efficient tuple implementation
From: Louis Dionne (ldionne.2_at_[hidden])
Date: 2014-06-15 09:44:46

Larry Evans <cppljevans <at>> writes:

> On 06/06/14 21:18, Louis Dionne wrote:
> >
> > [...]
> >
> IIRC, list uses an evaluator and "tagged" lists where the 1st element in
> the list is a tag for the operation to be performed and the
> evaluator dispatches on this tag to do the operation with the
> operands being the remaining args in the list.

I don't understand which list you are talking about. Are you talking about
MPL11 lists, Hana lists or something else? MPL11 lists and Hana lists use
type class based dispatching, so that would be incorrect if you were talking
about those.

> The attached is my first attempt at doing something similar with the
> idea you propose.
> I'm wondering if spirit might use something similar where the
> tags, instead of being op_or or op_and, would be op_alt and op_seq
> where op_alt would correspond to the alternative parser:
> and op_seq would correspond to the sequence parser:
> Does this look useful? Any suggested improvements would be appreciated.

IIUC, tagged tuples are a kind of dispatching system, right? If so, I don't
see the gain over a traditional tag (or type class) based dispatching. I
might be missing something; could you please explain?


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