
AMDG I'm not sure what namespace to use for switch. Since there will be more than just the single function template, switch_, I don't really want to put it directly in namespace boost. adding an 's' to make namespace switches sounds a little odd. Any suggestions? In Christ, Steven Watanabe

Steven Watanabe wrote:
AMDG
I'm not sure what namespace to use for switch.
Since there will be more than just the single function template, switch_, I don't really want to put it directly in namespace boost. adding an 's' to make namespace switches sounds a little odd. Any suggestions?
Like filename. #include "boost/switch/func.hpp" namespace bs = boost::switch; int main() { bs::func(); } -- Gonzalo Garramuño ggarra@advancedsl.com.ar AMD4400 - ASUS48N-E GeForce7300GT Xubuntu Gutsy

From: Steven Watanabe
I'm not sure what namespace to use for switch.
Since there will be more than just the single function template, switch_, I don't really want to put it directly in namespace boost.
I agree.
adding an 's' to make namespace switches sounds a little odd. Any suggestions? boost::switch ? My understanding is that some compilers have problems with with boost::switch_::switch_, but boost::switch::switch_ ought to be fine.
-- Martin Bonner Senior Software Engineer/Team Leader PI SHURLOK LTD Telephone: +44 1223 441434 / 203894 (direct) Fax: +44 1223 203999 Email: martin.bonner@pi-shurlok.com www.pi-shurlok.com disclaimer

On Wednesday 13 February 2008 11:53:40 Martin Bonner wrote:
From: Steven Watanabe
I'm not sure what namespace to use for switch.
Since there will be more than just the single function template, switch_, I don't really want to put it directly in namespace boost.
I agree.
adding an 's' to make namespace switches sounds a little odd. Any suggestions?
boost::switch ? My understanding is that some compilers have problems with with boost::switch_::switch_, but boost::switch::switch_ ought to be fine.
But "switch" is a keyword so you can't use it for namespace names. -- Mihai RUSU Email: dizzy@roedu.net "Linux is obsolete" -- AST

----Original Message---- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Dizzy Sent: 13 February 2008 10:03 To: boost@lists.boost.org Subject: Re: [boost] Switch namespace
On Wednesday 13 February 2008 11:53:40 Martin Bonner wrote:
From: Steven Watanabe
I'm not sure what namespace to use for switch.
Since there will be more than just the single function template, switch_, I don't really want to put it directly in namespace boost.
I agree.
adding an 's' to make namespace switches sounds a little odd. Any suggestions?
boost::switch ? My understanding is that some compilers have problems with with boost::switch_::switch_, but boost::switch::switch_ ought to be fine.
But "switch" is a keyword so you can't use it for namespace names.
[Smacks hand against forehead] D'oh! Of course. (I can only hope that is the stupidest thing I say this month - I /really/ don't want to say something stupider than that!) How about: boost::control_flow boost::switch_case ? (I don't much like either of those, but maybe they'll inspire somebody else). -- Martin Bonner Senior Software Engineer/Team Leader PI SHURLOK LTD Telephone: +44 1223 441434 / 203894 (direct) Fax: +44 1223 203999 Email: martin.bonner@pi-shurlok.com www.pi-shurlok.com disclaimer

AMDG Zach Laine wrote:
How about: boost::control_flow boost::switch_case ?
(I don't much like either of those, but maybe they'll inspire somebody else).
Well, usually such compile-time versions of familair runtime constructs are called static_*, so how about static_switch?
Well... It's not really a compile time version of a switch statement. Thanks for the help. I think the best suggestions were control/control_flow although I'm still not entirely happy with them. In Christ, Steven Watanabe

On Feb 13, 2008 8:47 AM, Steven Watanabe <watanabesj@gmail.com> wrote:
Thanks for the help. I think the best suggestions were control/control_flow although I'm still not entirely happy with them.
"control" does sound nice... also "flow_control"? "switches" sounds a bit odd at first but it kinda grew on me. I'm not sure whether there is a precedent for this in boost, but maybe "switchlib"? (that has a pretty fierce sound to it, like "switchblade" ;-).. although it certainly departs from the suggested naming convention). Or an acronym? "fcl" (flow control library?)... but that departs from the suggested convention too. Another alternative altogether might be to find a good home in existing libraries/namespaces (utility? something else?) That of course depends on what the final switch library looks like, and the say of any library authors that would be involved. Just some ideas... Stjepan

On Feb 13, 2008 7:12 PM, Stjepan Rajko <stipe@asu.edu> wrote:
On Feb 13, 2008 8:47 AM, Steven Watanabe <watanabesj@gmail.com> wrote:
Thanks for the help. I think the best suggestions were control/control_flow although I'm still not entirely happy with them.
"control" does sound nice... also "flow_control"? "switches" sounds a bit odd at first but it kinda grew on me. I'm not sure whether there is a precedent for this in boost, but maybe "switchlib"? (that has a pretty fierce sound to it, like "switchblade" ;-).. although it certainly departs from the suggested naming convention). Or an acronym? "fcl" (flow control library?)... but that departs from the suggested convention too.
But there are precedents though, think mpl... sl (switch library) wouldn't be bad, but maybe too short an collision prone.
Another alternative altogether might be to find a good home in existing libraries/namespaces (utility? something else?) That of course depends on what the final switch library looks like, and the say of any library authors that would be involved.
+1 for utility, depending on how many names the switch library puts in a namespace. -- gpd

Steven Watanabe wrote:
AMDG
Zach Laine wrote:
How about: boost::control_flow boost::switch_case ?
(I don't much like either of those, but maybe they'll inspire somebody else).
Well, usually such compile-time versions of familair runtime constructs are called static_*, so how about static_switch?
Well... It's not really a compile time version of a switch statement.
Thanks for the help. I think the best suggestions were control/control_flow although I'm still not entirely happy with them.
boost::functional?

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Martin Bonner Sent: 13 February 2008 10:36 To: boost@lists.boost.org Subject: Re: [boost] Switch namespace
----Original Message---- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Dizzy Sent: 13 February 2008 10:03 To: boost@lists.boost.org Subject: Re: [boost] Switch namespace
On Wednesday 13 February 2008 11:53:40 Martin Bonner wrote:
From: Steven Watanabe
I'm not sure what namespace to use for switch.
Since there will be more than just the single function template, switch_, I don't really want to put it directly in namespace boost.
I agree.
adding an 's' to make namespace switches sounds a little odd. Any suggestions?
boost::switch ? My understanding is that some compilers have problems with with boost::switch_::switch_, but boost::switch::switch_ ought to be fine.
But "switch" is a keyword so you can't use it for namespace names.
[Smacks hand against forehead] D'oh!
Of course. (I can only hope that is the stupidest thing I say this month - I /really/ don't want to say something stupider than that!)
LOL! How about 'case'? Oops no ;-)) Or perhaps 'namespace cases' might be a bit better? There is only one switch but multiple cases? Paul --- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow@hetp.u-net.com

Steven Watanabe wrote:
AMDG
I'm not sure what namespace to use for switch.
Since there will be more than just the single function template, switch_, I don't really want to put it directly in namespace boost. adding an 's' to make namespace switches sounds a little odd. Any suggestions?
boost::control
participants (11)
-
Andrey Semashev
-
Deane Yang
-
Dizzy
-
gchen
-
Giovanni Piero Deretta
-
Gonzalo Garramuño
-
Martin Bonner
-
Paul A Bristow
-
Steven Watanabe
-
Stjepan Rajko
-
Zach Laine