in reply to Re^2: RFC: Case package documentation
in thread RFC: Case package documentation
I probably overstated my point about the immutability of the smart match dispatch table. My negative reaction upon learning that this table could not be changed stemmed from the idea that one of the strengths of a dispatch table over a hard-coded battery of if-statements (or a switch statement in C, for that matter), is that the dispatch table can be modified during runtime. In fact, such a table can be built by the program from scratch (e.g. upon parsing a configuration file, for example). Therefore it comes as a let down to find something called "dispatcher" (which is strongly suggestive of a dispatch table) that cannot be modified at runtime.
It really boils down to the nebulous concept of "programmer's expectations". My comments here are just one data point; you probably need a few more :-) .
How about changing the name of the main function from "dispatcher" to "switch" (as I think you once had it)? In this way you would not be telegraphing an implementation detail that, in this case at least, turns out to be a bit confusing.
the lowliest monk
|
|---|