|
Boost Users : |
From: Stjepan Rajko (stipe_at_[hidden])
Date: 2008-01-03 15:49:56
On Jan 2, 2008 2:36 PM, dan marsden <danmarsden_at_[hidden]> wrote:
> Stjepan Rajko wrote:
> > If you are interested, please consider submitting a review of this
> > library. I will send more detailed instructions on what to include in
> > the review on the 5th.
>
> Can I jump the gun with with a few questions please?
Of course - thanks for opening up the discussion! I'm just not sure
whether Steven will be able to respond until the review officially
starts.
>
> Why is the fall through behaviour to throw an exception? This is
> not consistent with standard switch, possibly a motivation section is
> needed in the docs to explain this type of decision?
>
> I'm not too clear with the documentation what the parameter 'n' can
> be? It is of type 'Int' which is described as being an Integer in the
> parameters section of the documentation. What does this mean, any
> built in integral type, can I switch on a std::string? What are the
> limitations? I got a bit lost here in the docs here, after admittedly only
> a quick read. Maybe just some clarification is required?
>
> The parameter section does not specify the arities of the 2 function
> object parameters, I had to deduce them from the example. Why do
> these have to be function objects, and not just any callable type,
> including ordinary functions (using the Boost.ResultOf mechanism to
> sort out the return type)? I'm not sure how useful that would be for 'f',
> but for 'default_' a full blow function object seems a bit much typing,
> can't I just use a function.
>
> Also, why is 'default_' unary, the default in a standard switch
> statement does not access the switch parameter, and the example
> does not exploit this feature either. Why not just a nullary function?
> Again some motivation might be nice.
>
> And finally, as the introduction mentions the efficiency of the standard
> switch statement, could the docs show some performance stats for the
> library code for comparison?
>
> Cheers
>
> Dan
>
Stjepan
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net