Boost logo

Boost :

From: Brian McNamara (lorgon_at_[hidden])
Date: 2003-11-23 01:42:44


(Replies to a number of messages in the thread, all rolled into one
 big message.)

Gabriel Dos Reis wrote:
> Brian McNamara wrote:
> > In my opinion, "named conformance" is the right way to design most
> > interfaces, whereas "structural conformance" (as above) is the wrong
> > way.
>
> I believe only experience can tell.

Indeed; practical experience will eventually "trump" anyone's opinion on
the issue.

> I think I need arguments other than that is how Haskell do it.

I agree that "how language X does it" does not mean that C++ ought to do
it the same way. (As you have pointed out, C++ is rather different from
most other languages in a variety of important respects.)

On the other hand, I do think it is useful to consider how other
languages have done something, as it may provide useful insight into
how to solve the problem.

> In order not to lose focus, we've tried to write down the design
> criteria that should shape the design of concepts in C++.
> The post-Kona mailing is now available from the committee site; I
> would encourage those people interested in concepts and who weren't in
> Kona to download the concept papers, and especially the design
> criteria. I admit that they are not as complete as we would have
> liked, but they contain key ideas.

I just read the papers for the first time yesterday. There are _lots_
of good ideas there. I found that the design criteria that you-all
listed covered more than 90% of the criteria I would have put on my own
list, and there were a number of criteria you-all listed that I had
never even considered. Good stuff.

> > [some foolish blather]
>
> Library authors are not the only concept producers and application
> programmers are not the only concept users. In fact, both are
> producers and consumers of concepts.

You're right about this; I had completely oversimplified the issue.

> It is far from obvious that there is One True Answer.

Agreed. And apologies if I've come off as a zealot on the topic.
(I think I give this impression all too often.) We do need some actual
practical experience with different concept-checking possibilties in
order to make an informed decision. In lieu of that experience,
however, I do think it's useful to do some of the type of debating we're
doing here (about theoretical merit/demerits of various approaches, what
other languages have done, etc.).

> [ stuff about whether or not compiler vendors can/will/might implement
> the equivalent of will_this_compile metafunction ]

First off, let me say that I would be a big fan of this feature (I have
often wished for it).

That said, I think it is possible to come up with a decent concept
mechanism for C++ which does _not_ require this functionality. I am
now trying to flesh out some ideas along these lines.

-- 
-Brian McNamara (lorgon_at_[hidden])

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