Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2003-10-19 08:06:32


"Daniel Frey" <daniel.frey_at_[hidden]> wrote in message
news:bmu14q$fae$1_at_sea.gmane.org...
Thorsten Ottosen wrote:
> AFAICT, the problem is not that the C library functions modify their
> arguments, its rather
> the use of pointers and fixed-sized buffers.

-But they often get a pointer to a buffer which they modify and return
-the success of an operation (or number of modified elements or
-whatever). The basic point is that C and C++ are different languages and
-that this results in different programming styles and different
-expectations for the reader of a piece of code. I don't think we should
-use calls to C or Pascal functions to justify the design of a C++
interface.

who's justifying it? I'm merely pointing out that one cannot assume f(x)
does
not modify x (and you agreed).

I don't think we should use inexperienced users' opinion to justify the
design of
a C++ interface (or any interface).

C++ is not a pure functional language and inplace mutating algorithms are
all over the place.

I don't have more to say about this; I acknowledge that you have a different
view and
I agree it would be nice to hear other people's opinion.

regards

Thorsten


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