Compare boost::hana to D
Ali Çehreli via Digitalmars-d
digitalmars-d at puremagic.com
Thu Apr 20 02:32:02 PDT 2017
On 04/20/2017 02:06 AM, Ola Fosheim Grøstad wrote:
> On Wednesday, 19 April 2017 at 08:19:52 UTC, Ali Çehreli wrote:
>> I'm brushing up on my C++ to prepare for my C++Now 2017
>> presentation[1]. boost::hana is an impressive library that overlaps
>> with many D features:
>>
>> http://www.boost.org/doc/libs/1_64_0_b2/libs/hana/doc/html/index.html
>>
>> Have you used boost::hana? What are your thoughts on it?
>
> I've looked at it and concluded that it didn't really offer anything
> substantial for me over what I can do with C++17 and my own minor
> extensions to the C++ standard lib.
>
> But I'm not really keen on pulling in boost in general as the best
> parts of it ends up in the C++ standard anyway when it is mature...
To their credit, according to their documentation, boost::hana is a
header-only library.
> What specifically are you finding in boost::hana that justifies adding
> it as a dependency?
My motivation is learning enough about modern C++ to not make a fool of
myself in front of an expert C++ crowd. :) If I hadn't known about
boost::hana, I could have easily stressed D's compile-time features as
if C++ did not have them. Now I see that although
as-always-less-readable, C++ has lots of compile-time features through
boost::hana. For example, boost::hana has the equivalent of AliasSeq,
and it's not too inconvenient.
Ali
More information about the Digitalmars-d
mailing list