Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-03-03 11:50:23


Tom Widmer wrote:
> On Wed, 3 Mar 2004 18:11:54 +0200, "Peter Dimov" <pdimov_at_[hidden]>
> wrote:
>
>> Thorsten Ottosen wrote:
>>> David,
>>>
>>> I'm in full support of your effort. Just a small comment:
>>>
>>> int main(int argc, char* argv[])
>>> {
>>> window w = create_window();
>>> w->title("Example window");
>>>
>>> why is window implicitly a pointer?
>>
>> What alternatives do you have in mind?
>
> window_ptr w = create_window();
> or
> shared_ptr<window> w = create_window();
>
> Is the former too Hungarian?

<shrug> I don't need the _ptr suffix to repeatedly remind me that a type is
a pointer (I can remember _that_ much), but I don't actively hate it either;
it's just dead weight. (Hungarian is 'window pw = create_window()', and I
use that fairly often.)

I like shared_ptr<window>, but the Real World(tm) will just invent their own
typedefs. It's too much typing and it takes away the illusion that the
actual pointer type is "abstracted out".


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