Boost logo

Boost :

From: Noah Stein (noah_at_[hidden])
Date: 2004-11-12 17:28:17


> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]]
> On Behalf Of Thorsten Ottosen
> Sent: Friday, November 12, 2004 2:47 PM
> To: boost_at_[hidden]
> Subject: [boost] Re: [Review] Named parameters library

> 1. Clearly, this is not nice
>
> window* w = new_window("alert", true, true, false, 77, 65);
>
> However, the amount of work needed to code parameters for this is quite
> large.
> A simple, effective way is just to do it like this:
>
> window* w = new_window("alert");
> w->set_resizable( true );
> w->set_height( 77 );
> ....
> and you might provide chaining to make it more concise. In addition there
> is
> no forwarding problems and you might have these
> functions anyway.
>

What about the situation where you need to specify the parameters at
construction, e.g. the RAII paradigm?

-- Noah


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