At 03:35 AM 2/4/2003, Andrei Alexandrescu wrote:
>"Beman Dawes" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> * Should a PBSP supply policies that are prone to be used unsafely?
>>
>> I'd say "no" is an acceptable answer, at least for something like the
T*
>> conversion in widely used libraries like the Standard Library and
Boost.
>>
>> * Should a PBSP allow user supplied policies to modify interface,
perhaps
>> in ways that may be unsafe or even just unfortunate?
>>
>> That's tougher. At some point I lose interest in a PBSP if it prevents
me
>> from doing the things I want to do, even if I only want to do them in
the
>> privacy of my own code.
>
>The original SmartPtr design leaves the onus of choosing the right policy
>combination to the application designer. To me, that's a design I find
>reasonable and in keep with the spirit of C++. Safer designs are possible
>that reject policy combinations that "don't go together" at the price of
>being more complicated or less efficient or less flexible.
Yes, understood.
One of the advantages of a generative approach is the improved ability to
reject invalid policy combinations.
In the generative experiments I tried a couple of years ago, there wasn't a
problem with added complexity or less efficiency, but the result was
definitely less flexible.
A GenVoca or curiously recurring template pattern hierarchy might be able
to solve all those problems, but they were at the boundary of my skill
level, so I never tried them.
--Beman
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
- [boost] Array support [was SmartPtr (Loki) - auto_ptr/... Beman Dawes
- Re: [boost] Array support [was SmartPtr (Loki) - auto_... David Abrahams
- Re: [boost] Array support [was SmartPtr (Loki) - auto_... Beman Dawes
- [boost] Re: Array support [was SmartPtr (Loki) - auto_... David B. Held
- [boost] Re: Array support [was SmartPtr (Loki) - auto_... David B. Held
- Re: [boost] Array support [was SmartPtr (Loki) - auto_... Howard Hinnant
- Re: [boost] Array support [was SmartPtr (Loki) - auto_... Beman Dawes
- Re: [boost] Array support [was SmartPtr (Loki) - auto_... Howard Hinnant
- Re: [boost] Array support [was SmartPtr (Loki) - auto_... Beman Dawes
- [boost] Re: Array support [was SmartPtr (Loki) - auto_... Andrei Alexandrescu
- Re: [boost] Array support [was SmartPtr (Loki) - auto_... Beman Dawes
- Re: [boost] Array support [was SmartPtr (Loki) - auto_... David Abrahams
- Re: [boost] Array support [was SmartPtr (Loki) - auto_... Beman Dawes
- [boost] Re: Array support [was SmartPtr (Loki) - auto_... Andrei Alexandrescu
- Re: [boost] Re: Array support [was SmartPtr (Loki) -au... Peter Dimov
- [boost] Re: Array support [was SmartPtr (Loki) - auto_... Howard Hinnant
- [boost] Re: Array support [was SmartPtr (Loki) -auto_p... Andrei Alexandrescu
- [boost] Re: Array support [was SmartPtr (Loki) -auto_p... Howard Hinnant
- [boost] Re: Array support [was SmartPtr (Loki)-auto_pt... Andrei Alexandrescu
- Re: [boost] Re: Array support [was SmartPtr(Loki)-auto... Paul Mensonides
- Re: [boost] Re: Array support [was SmartPtr (Loki)-aut... Greg Colvin