Boost logo

Boost :

From: John Torjo (john.lists_at_[hidden])
Date: 2003-10-17 08:42:06


In the docs for lambda, at a point, Joel de Guzmann suggested a better
syntax for control structures, namely:

if_(condition)[then_part]
if_(condition)[then_part].else_[else_part]
while_(condition)[body]
do_[body].while_(condition)
for_(init, condition, increment)[body]

I strongly prefer this, but the same could be done for switch_statement,
which is pretty huge otherwise:

switch_(condition)
    .case_<label1>[lambda_expression]
    .case_<label2>[lambda_expression]

What do you think?

Best,
John

--
John Torjo
-- "Practical C++" column writer for builder.com.com
Freelancer, C++ consultant
mailto:john_at_[hidden]

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