Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-11-24 10:46:56

David Abrahams wrote:
> Gabriel Dos Reis <gdr_at_[hidden]> writes:
>> David Abrahams <dave_at_[hidden]> writes:
>>> Brian McNamara <lorgon_at_[hidden]> writes:
>>>> I feel like most C++ programmers have become so accustomed to the
>>>> "happy accident of structural conformance" that they think it is
>>>> the common case. It's not. Aside from functionality named by (1)
>>>> operators or (2) a handful of common names that have fallen into
>>>> common usage (like "swap" and "clone"), the chances that
>>>> some-random-library-
>>>> is-going-to-just-happen-to-present-an-interface-which-exactly-
>>>> structurally-conforms-to-the-concepts-you-developed-independently
>>>> are nearly zero.
>>> Most C++ programmers do seem to miss this.
>> I don't think that is a fair characterization.
> Touchy, touchy, Gaby! No need to get defensive of the whole
> community! It's been my personal experience, in discussing the
> potential problems with ADL, that most of the C++ programmers I've
> spoken with seem to feel that it's just as likely as not that a random
> unqualified call which conforms structurally is exactly the right
> thing. I've had to pull out the above argument several times in the
> past few years.

But did you consider the possibility that those C++ programmers feel that
way because in their experience random unqualified calls that conform
structurally usually _were_ the right thing?

In other words, isn't it possible that the "chances that ... are nearly
zero" assertion above is incorrect, and that the happy accident of
structural conformance _is_ really the common case?

Boost list run by bdawes at, gregod at, cpdaniel at, john at