Boost logo

Boost :

From: Sean Corfield (sean.corfield_at_[hidden])
Date: 1999-06-10 09:41:34


On Thursday, June 10, 1999 2:26 PM, Beman Dawes [SMTP:beman_at_[hidden]] wrote:
> Functionality Name SGI STL's Name
> f(g(value)) compose compose1
> f(g(value),h(value)) inject_compose compose2
> f(g(value1),h(value2)) distr_compose
> f(g(value1,value2)) binary_compose
>
> I think these were the names you suggested.

Yes, pretty much.

> >-- The HP and SGI STL implementations have included unary_compose and
> > binary_compose (with helper functions compose1 and compose2) for

Yes, this is a problem. I think the helper function names are the bad ones
(in much the same way as the various ptr to fun adapters in the Standard
Library are made hideously ugly by cryptic naming!).

> > (I've got a degree in math,
> > and I wasn't familiar with those terms until Sean explained them to
> > Nico and me.)

Well, it is partly math and partly functional programming. (And of course
British math is different to American and German math :)

> While this naming scheme isn't perfect, it is easy to remember once
> you understand that the first number is the number of functions and
> the second is the number of arguments.

But it doesn't reflect the distribute / inject semantics and it doesn't
generalise. I might have a go at produce something that involves more
overloading / partial specialisation. I'm also considering trying to
building some templates that assist argument currying...

--
Sean A Corfield
Senior Consultant
IS Solutions plc tel:+441932893373
http://www.issolutions.co.uk
**********************************************************************
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they   
are addressed. If you have received this email in error please notify 
the system manager.
This footnote also confirms that this email message has been swept by 
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
------------------------------------------------------------------------
eGroups.com home: http://www.egroups.com/group/boost
http://www.egroups.com - Simplifying group communications

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