Boost logo

Boost :

Subject: Re: [boost] [Hana] Formal review
From: Louis Dionne (ldionne.2_at_[hidden])
Date: 2015-06-18 21:12:22


Joel de Guzman <djowel <at> gmail.com> writes:

>
> On 6/19/15 3:07 AM, Louis Dionne wrote:
> > [...]
>
> It's not just about compile time, no. What's more important to me is
> the conceptual overhead of using another library to do simple things.
> TMP in what were once TMP heavy libraries used to take a significant
> amount of code in c++03. Not anymore. Then of course another factor is
> minimizing dependencies. The less dependencies the better. Zero is ideal.

I understand your point about minimizing dependencies. However, the same goes
for any kind of library, TMP or not. At some point, one must draw a line and
accept having external dependencies, or eternally reimplement everything from
scratch. I guess you are the only one who can decide where that line should be
drawn for your own projects, and that's OK.

However, even though you may be content with the ease of writing TMP code in
C++14, I think you might be surprised to see how shorter it could be if you
used Hana. This is, for example, the case of Zach's Units-BLAS library. It
was really quite short with C++14 only, but it was even shorter with Hana.
And the code was written with a higher level of abstraction. And in that
case, there was even a compile-time speedup over std::tuple + handwritten
stuff.

Anyway, I'd like to have a look at your Phoenix-lite project, to see if it
could be written using Hana, and how so. It is also definitely possible that
no gains can be obtained from using Hana in that project, in which case that
would give me a good example of what _not_ to use Hana for.

> There are other issues, such as debuggability of TMP code using the
> lambda trick, if you are still using that for CT efficiency, but I
> guess I need to dive deeper to give a real review. Not being able
> to debug TMP code is a showstopper for me.

I'm not using the lambda trick anymore because of shabby support for generic
lambdas and the lack of constexpr lambdas.

Regards,
Louis


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