Strings in Switch
Jonathan Gibbons
Jonathan.Gibbons at Sun.COM
Mon Dec 7 10:03:50 PST 2009
Paul Benedict wrote:
> Joe,
>
> I reviewed the check-in and read a presentation about the
> implementation. I get that it translates into two switch statements,
> but I think there are cases where the duality can be eliminated. If
> the first switch statement produces no hash collisions, I don't think
> the second switch statement is necessary. Thoughts?
>
> Paul
>
>
Paul,
Don't forget you have to take care to handle all the other strings in
the world that might be passed into the first switch. It's not just a
matter of looking at the strings explicitly listed in the case labels,
but of all the other strings that might be handled in the default case.
-- Jon
More information about the coin-dev
mailing list