From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-04-29 21:37:52
"Phil Nash" <phil.nash.lists_at_[hidden]> wrote in message
> I may be using too many ambiguous terms here because I don't have a
> example, but I hope you see what I am getting at. I don't expect all types
> other than the pointee type to be eliminated for the interface, as Dietmar
> aims for, but by reducing them to the minimum set this could mitigate the
> Is this a possibility?
I'm sorry Phil, but I cannot follow. My view might be limited and
simplistic, but to me, interfacing libraries is, when all has been said and
done, a matter of agreeing on compatible types. I believe that whether you
do that by using templates, typedefs, house-baked types, or opaque handles,
is a secondary issue. Maybe I misunderstood you, but all you say doesn't
really make agreement on types easier.
In interfacing code, agreement on compatible types must be there. If we all
are on the same page on that, great. Then I'll come with the argument that
policies don't make that agreement harder to reach in any way. Better yet,
if you need, that agreement on compatible types can be much finer-grained,
more typesafe, less prone to errors, and more efficient when using policies
as opposed to any other technique that's been discussed here. Nothing
demeaning here, but to me it's hard to compare something that's clear how it
works, with a pie-in-the-sky design that takes compile-time stuff, puts it
in runtime stuff, magically takes it back to compile-time stuff, and is
somehow more advantageous in ways that are not told nor proven.
Now I hope this post piqued your debating interest :o).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk