Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-07-19 13:24:24

"Eugene Lazutkin" <eugene_lazutkin_at_[hidden]> writes:

> It looks like reasonable goal. Personally I found that there are two cases:
> 1) If there is large existing API => use smart handles. In this case smart
> handle serves two purposes:
> a) provides invisible housekeeping (like destruction of underlying handle)
> b) behaves like regular handle to be easily used with existing API
> 2) If existing API is compact => use functional wrapper. Smart handle may be
> used as part of such wrapper.
> Example for #1. Windows GDI has hundreds (if not thousands) API functions.
> New versions of Windows introduce new API functions. It doesn't make any
> sense to cover it with functional wrapper. MFC tried it and failed.

How do you measure failure? Certainly MFC is primitive, but tens of
thousands of developers use it every day. There are better
alternatives - Microsoft tells me they have been shipping an
"unsupported" library which is "what MFC would have been if we'd
started with templates".

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at