Boost logo

Boost :

Subject: Re: [boost] Requesting endorsements for YAP review
From: Zach Laine (whatwasthataddress_at_[hidden])
Date: 2017-12-07 06:10:24


On Wed, Dec 6, 2017 at 9:43 AM, Jason Roehm via Boost <boost_at_[hidden]
> wrote:

>
> I would endorse it as well. I agree with the others that the documentation
> looks good. I don’t consider myself expert enough to render an opinion on
> the library itself, but I would like to see it get a look from the
> community.
>
> One suggestion: if you think it’s appropriate, you might add some details
> that compare YAP with Boost.Proto since they cover largely the same
> territory. Are there things that you can do with YAP, or do more easily or
> with less code, than you can with Proto?

I don't know if I want to add this to the docs or not; I've been thinking
about doing so. But I'll do so here now. YAP can do everything that Proto
does, plus a whole lot more. It usually does so with far less code.
Almost all of Proto's examples are reproduced as YAP examples. The ones
that are not were skipped because they showed how to do something with
Proto that is so easy to do in YAP that it makes a weird example. If you
compare these common examples across Proto and YAP I hope you'll find that
they're strictly easier with YAP. For example:

http://www.boost.org/doc/libs/master/doc/html/proto/users_guide.html#boost_proto.users_guide.examples.tarray

https://tzlaine.github.io/yap/doc/html/boost_yap__proposed_/manual/examples/tarray.html

> Can you show any metrics on performance improvements (e.g. compile time
> for like examples)?

 I don't have metrics on this, but YAP is *way* faster to compile than
Proto. I have not found long compile times with YAP that I felt needed
addressing. At one point I added a compile stress test that included and
expression of thousands of terminals, and it took ~15 seconds to compile.
After that, I stopped worrying about compile times.

Are there any significant differences in philosophy?
>

Yes, but only because YAP does some things that Proto cannot, since Proto
is 98 code. In Proto, transforms are evaluated implicitly, and expressions
are evaluated eagerly. In YAP, you can use that same evaluation model, but
the recommended model is to do explicit transforms and lazy evaluation.
This aspect is covered quite extensively in the docs already.

Zach


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