Boost logo

Boost :

From: Greg Colvin (greg_at_[hidden])
Date: 2002-05-02 20:11:52


At 06:41 PM 05/02/2002, you wrote:
>"Greg Colvin" <greg_at_[hidden]> wrote in message
>news:5.1.0.14.0.20020502151136.02af8e00_at_GMMAIL...
>> And, referring back to a point you made about HANDLE causing
>> shared_ptr<HANDLE> to different things (like files and windows)
>> to be assignable, I think the real problem is that Win32 uses
>> a void* handle to point to all kinds if things, and has many
>> functions that work on generic HANDLEs, as well as many functions
>> that work only on specific HANDLEs. It's a mess to untangle,
>> but can be done with a wrapper class for the generic HANDLE and
>> derived classes for more specific HANDLEs.
>
>Inheritance doesn't model things properly here. The different types of
>handles in Windows are unrelated and do not sport much commonality and
>little variation. Consequently, a hierarchy is not useful here.

I'd have to go back over too much documentation to disagree, and
that's not my point anyway.

>Different types of handles should map to different, distinct types.

Yes, yes. And HANDLE is a Win32-specific type that should be
exposed as little as possible, including as shared_ptr<HANDLE>.

>> Then we can negotiate shared_ptr's assimilation.
>
>As I wrote in my post "Adding Loki to Boost: reprise", I believe that it's
>best I don't put myself in a negotiator's position.

By "we" I meant "us". That is, Boost. And our style of
negotiation tends toward vigorous, exaggerated argument,
which is half the fun of it all. Especially when, in the
end, we find ourselves in violent agreement.


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