[Note: either groups.google.c om or the comp.std.c++ moderation SW
appears to be eating messages, so this may wind up being a
repetitive posting.]
On Mar 20, 4:30 pm, d...@boost-consulting.com (David Abrahams) wrote:
on Tue Mar 20 2007, "W Karas" <wkaras-AT-yahoo.comwrote:
..
If you look at an algorithm like find, yes, it does have two
type parameters. But the only possible multiple dispatch case
is the call to operator != (RT a, T b) where RT is the return
type of the iterator's 'operator *' and T is the type of the
sought value. I would guess that, in the great majority
of situations where 'find' is used, T is the same as RT, or
an instance of T implicitly converts to RT, so there is no
true multiple dispatch.
I don't really see what that proves. T is not always the same as RT.
And then there's find_if, transform, accumulate, lower_bound, and a
whole slew of other algorithms with more complicated type
relationships.
I can only say this doesn't seem to jive with the usage of
templates that I personally have seen. Not much point in
arguing about guesstimates of statistical frequency of
patterns in the "general population" of code.
Maybe multiple dispatch does occur frequently when using
templates. But if GP is just OO with multiple dispatch and earlier
bindings,
It isn't. Did somebody claim it was?
I did. I tend to use the term "OO polymorphism" to cover
the idea of writing code that is only bound to a class
interface subset, regardless of whether the interface
subset is explicit or implicit. I realize that's
different for how this term in normally used in
the C++ realm, but then, what term should be used
for the more general idea?
>
that doesn't justify viewing GP and OO as being in some
huge all-important cage-match dichotomy in my opinion.
Whoosh! That went right over my head; I have no clue what you're
trying to say here.
This subthread was originally about whether the syntax
for Concepts should be very different from the
class declaration syntax, in order to emphasize
the difference between a Concept and a base class,
and the general difference between GP and OO.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:st*****@ ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ:
http://www.comeaucomputing.com/csc/faq.html ]