Boost logo

Boost :

From: Dave Gomboc (dave_at_[hidden])
Date: 2001-12-12 12:42:41


> First impressions are important. The impressions of new boost users
> are important. I just want to be sure that when we draw conclusions
> based on those first impressions, we're not being distracted by the
> irrelevant. I think the binders and composers in Mat's original
> example made things look complicated to the point where they
> obscured the value of the MPL algorithm decomposition.

As a new boost user who is interested in metaprogramming and has some
small prior experience in functional programming (I've used Miranda and
Standard ML way back in my own undergraduate class work, and have TAed a
couple of Lisp classes -- btw, almost everybody used first and rest, not
car and cdr, despite the prof using car and cdr!), I'd just like to
comment that it'd be very tedious if one had to use pattern matching to
implement everything. IMO the additional abstraction available in the
MPL implementation is useful and important, and that will become clear
once people gravitate away from the "here's how recursion works"
examples that are shown in CS 101.

I also agree with the comments about naming regarding "IndexOf" should
be "at", and so forth. I imagine it will be a long, long time before I
stop thinking of "for_each" as anything other than "map" (from
Haskell/Miranda), but "for_each" is already the C++ term for it in the
STL, and that's not up for renaming. :-) Metaprogramming is still
programming!, and consistency is important, so call it for_each
everywhere, irregardless of whether it's happening at compile-time or
run-time.

After one "gets their head around functional programming" in the first
place, the next biggest problem for the developer new to functional
programming trying to use either MPL or Loki is going to be (warning:
opinion ahead!) the ugly syntax. C++ is just like that, there's no
dodging it. I guess I'll just have to learn to live with it. ;-)

Dave Gomboc


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