Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-11-17 19:57:14

"Noah Stein" <noah_at_[hidden]> wrote in message
| > -----Original Message-----
| > From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]]
| > On Behalf Of Thorsten Ottosen
| > Sent: Wednesday, November 17, 2004 6:23 PM
| > To: boost_at_[hidden]
| > Subject: [boost] Re: [Review] Named parameters library
| > that's pretty close. For those aguments that has reasonable defaults, I'm
| > suggesting that
| > the defaults can be overridden explicitly later.
| >
| > But to be fair, this idea is far from new and so I'm not the person that
| > should be given credit.
| The point I've tried to make is that sometimes there is no second chance to
| construct an object. At times, I have one shot at initializing hardware.
| There is no second chance. I can't just default construct and change the
| settings later. At lost not without completely shutting down the hardware
| and restarting it. That's just not an option. I can't refactor the
| hardware.

Ok, I believe you, but I don't understand it. Here's why: a constructor is
nothing more than a C function
in some form. It takes some paramters and perhaps access global data. So what
do you mean by
"one shot"? Don't you get to decide what call that is the "one shot" (?) like

Foo f;
f.commit(); // this can is crusial, the others not

| In addition, what about dealing with libraries? For example, the BGL has a
| function named brandes_betweenness_centrality that takes 9 parameters. I
| would be hesitant to try to refactor the BGL locally on my machine.

so would I.

| My
| other option is construct a separate class in order to collect the
| parameters and make the call later. I think the custom forwarding class is,
| although similar, inferior.



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