Boost logo

Boost :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2006-04-10 12:13:52


Robert Ramey wrote:
> On the other hand - I don't see the motivation for including concepts
> in the core language. Haven't we been able to implement concept
> checking with the current facilities of the library? It seems to me that
> the main problem these days with the C++ language these days is that
> its too hard to write a correct compiler for it. Making the core
> language fancier will only make this problem worse.

Concepts in the language allow things that aren't currently possible with
C++98. For example, standard algorithms of the form:

   fn( Iterator first, Iterator last )
   fn( Iterator first, Iterator last, Functor f )

cannot have overloads (in C++98) taking containers/ranges:

   fn( Iterator first, Iterator last )
   fn( Iterator first, Iterator last, Functor f )
   fn( Range rng )
   fn( Range rng, Functor f )

as the last overload is ambiguous. Concepts will allow this to be resolved
as a Functor will not match the Iterator requirements :).

> While, the commitee is at it - how about re-visiting two-phase lookup.
> Apparently there are enough implementers skeptical about it that
> they've declined to implement it. (for good reason in my opinion).
> I believe this is related to the "export" feature - which has also
> failed to gain traction.

export is way too complicated to implement, including changes to the
output the compiler generates and how the linker works. Two-phase
lookup has been implemented by a growing number of compiler
vendors.

The reason why some vendors choose not to implement this is that
it will break (a lot of?) existing code.

> So its seems to me that there are a number of issues more
> important/urgent than the ones currently being focused on.

I, for one, like concepts. They also help simplify the implementation
of functions like std::distance as they remove the need to use
iterator_traits and the iterator categories that clutter implementations
and make them harder to read.

- Reece
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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