Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2004-02-21 05:19:02


"Douglas Gregor" <gregod_at_[hidden]> wrote in message
news:200402201010.39889.gregod_at_cs.rpi.edu...

> > (BTW it would really help for the whole
> > library review, if you could provide a little introduction what is a
> > "functional programming" in a first place; how it differ from other
> > programming styles and what is the place of your library in this - I
mean
> > what purpose does it serve, what solution does it provide).
>
> I think this is way out of scope for the library. Functional programming
has
> been around for ages, and it shouldn't be up to Brian to introduce and
> explain all of it in his introduction.

Hey No problem:

Functional programming' basically separates 'Joe User' from 'Johnny Guru'.
'Joe User' is not considered capable to write any real code. So he is
provided with a set of functions written by 'Johnny Guru'.
The idea is that doing things this way 'Joe User' cant do anything 'stupid',
which makes it very easy to teach in universities. In the same way that
Pascal is easy to teach. Only problem is once out in the real world 'Joe
User' finds that none of the functions provided by 'Johhny Guru' actually
fit to solve real problems.

I am being too dismissive about 'Functional programming' . Basically it is
a higher level language than C++. And there are a lot of interesting
concepts, which might benefit other languages. The FC++ library is really an
attempt to use C+ to implement a higher level language. There also seems to
be a boost effort to modify C++ itself to conform to the 'discipline' of
'functional programming'. (If you are a pure functional programmer you must
find C++ incredibly 'dirty'. ) I guess C++ is one of the most successful
languages(dirty but 'Versatile :-) ) and Functional languages such as
Haskell and ML just aint.( 'clean' but straightjacketed).. so Functional
programmers,forced to use it, hope that they can advertise their product on
the back of it.) mpl uses some of the principles, but certainly in the
operator classes thing have gone a bit too far IMO.

Coming from a background of C and assembler the whole approach is alien to
me. However if you had Only been taught this stuff at University... :-)

Some functional programming weirdness:
references can be rebound ... :-)
Execution order not guaranteed... :-)
No assignment ...No variables... (hmm.. because Execution order not
guaranteed)

IOW its an entirely Different Programming Paradigm . FP doesnt have any OOP
concept, its not 'close to the machine'
I'm not against it outright(Some of the above ideas are very useful in
certain areas...e.g parallel processing) but it seems daft to mix it with
C++.

Hey ho ...luckily this is boost not compl.lang.c++ :-)

regards
Andy Little


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