Boost logo

Boost :

Subject: Re: [boost] [GSoC] [Boost.Hana] Formal review request
From: Dominique Devienne (ddevienne_at_[hidden])
Date: 2014-07-30 03:55:01


On Wed, Jul 30, 2014 at 1:19 AM, Louis Dionne <ldionne.2_at_[hidden]> wrote:

> pfultz2 <pfultz2 <at> yahoo.com> writes:
> > Here's a few list of names off the top of my head that could use more
> > C++-like names:
> >
> > foldl = fold
> > foldr = reverse_fold
> > fmap = transform
> > cons = push_front
> > scons = push_back
> > datatype = tag,tag_of
> > head = front
> > last = back
> > typeclass = concept
>
> I agree that using more C++ish names could make it more tempting for people
> to adopt the library. I'll think about providing aliases.
>

I agree with Paul, for FWIW. (as an average C++ dev who only dabbled in MPL
and Fusion, with little FP experience, and who finds cons and scons really
"esoteric")

> > Also, most C++ programmers are used to seeing libraries divided into
> > containers and algorithms, whereas Boost.Hana seemed to be built around
> > haskell-like interfaces.
>
> Hana is actually built around concepts (type classes) and models of those
> concepts (data types). Apart from the names, which I agree could have been
> chosen differently, it's the same "design paradigm" as usual generic C++
> libraries.

Names matter of course. And the closer you stay to C++ lore, as Paul
mentioned, the better IMHO.

And I'm not sure aliases is the way to go, since having two names for the
same thing only makes code reading difficult if it uses the "other" name
one's not used to.

It's your library of course, I'd never -1 it based on the name you prefer
to use. Thanks, --DD


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