|
Boost : |
From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-04-29 21:37:52
"Phil Nash" <phil.nash.lists_at_[hidden]> wrote in message
news:009901c1efea$b3c34870$10b387d9_at_TimeMachine...
[snip]
> I may be using too many ambiguous terms here because I don't have a
concrete
> 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
> situation.
>
> 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).
Andrei
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk