Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-10-31 13:57:43


At 10:35 AM 10/31/2002, Kevin S. Van Horn wrote:

>Noah Stein writes:
>
>>> Kevin S. Van Horn:
>>
>>> Does it matter to the user whether the signature of f is
>>> "void f(foo_t)" or "void f(foo_t const &)"? [...]
>>
>> Isn't a function signature in the API part of the interface and not the
>> implementation?
>
>I used to think so, but my experience with generic programming and
>some of Andrei's comments on this list have caused me to modify my
>opinion. From GP we learn that what is important is the _valid
>expressions_ -- that is, the syntax and semantics of component usage --
>rather than the component's declaration. For example, all we care is
that
>vector<int>::iterator is a valid type expression (along with requirements

>on objects of this type); we don't care whether it's a nested class of
>vector<int> or just a typedef.

Or compiler magic!

There were some discussions of this at the C++ committee meeting last week.
Some upcoming proposals for library components may be hopelessly detailed,
complex, verbose, error-prone, etc, if specified at the function signature
level. So they may only be specified at higher levels like valid
expressions.

--Beman


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