Boost logo

Boost :

Subject: Re: [boost] Interest in a list comprehension library?
From: Thomas Heller (thom.heller_at_[hidden])
Date: 2010-12-24 12:14:43


Brent Spillner wrote:

> On 21/12/2010 09:09, Mathias Gaunard wrote:

<snip>

>>It would be nice however, if it didn't reinvent the wheel and can be based
>>on Phoenix for the functional part.
>
> I definitely don't want to reinvent the wheel, and I was a little
> hesitant to publish this in case it largely duplicated work that
> someone else had done in Range or Phoenix or somewhere else. I've
> never used Phoenix; it seems fascinating but I'm a little wary of
> making it a dependency just to get something simple like a
> comprehension syntax. I also took a look at using Boost.Proto to
> provide the expression trees, but it seemed that the syntax was a
> little more verbose than it needs to be for things that will be
> evaluated only in the context of a comprehension expression. Either
> one of those libraries could likely replace most of the boilerplate in
> my expressions.hpp and operators.hpp; on the other hand, being
> boilerplate, it wasn't that hard to write or to get it to work exactly
> as I needed. At this point I'm leaning more toward providing adaptors
> to permit Proto or Phoenix expressions within a comprehension, rather
> than absolutely requiring the use of either.

I think this comprehension syntax would be a wonderful addition to phoenix.
In fact i was thinking of adding it to phoenix V3 myself.
By basing your work on phoenix v3 you would introduce a kind of big
dependency, true. However, that dependency is imho not a bad thing, it would
provide you with a powerful basis for your work. The only thing that needed
to be done is to code the logic for the list comprehension ... everything
else is already done for you.

> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


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