
On Mon, Apr 14, 2008 at 02:06:57PM +0000, Ivan Miljenovic wrote:
I see no reason to define createTabs or createTabsAlways.
Maybe not, I just liked the extra level of abstraction. This way, the booleans are only ever used twice, rather than addTabs{,Bottom}{,Always} all having to mention it.
A nicer way to acheive more readable code is to replace the Bool with a custom data type: data TabHowOften = AlwaysTabs | TabsWhenPlural Then your code is easier to read and you don't need to define these helpers.
And shouldn't the former function be tabMaker False?
Ummmmm..... yes ;-)
This, for instance, would have been more obvious with the above approach. I prefer to never use Bool when I could avoid it. It's too easy to forget (or for a reader to be forced to read the code to determine) which meaning "True" indicates.
Still not sure of the "always" name ending, but couldn't think of anything better at the time.
I'm not sure either. Always isn't too bad. -- David Roundy Department of Physics Oregon State University