[Haskell-cafe] Re: Improved documentation for Bool
Jonathan Cast
jonathanccast at fastmail.fm
Mon Jan 19 14:40:47 EST 2009
On Mon, 2009-01-19 at 19:33 +0000, Andrew Coppin wrote:
> roconnor at theorem.ca wrote:
> > I noticed the Bool datatype isn't well documented. Since Bool is not
> > a common English word, I figured it could use some haddock to help
> > clarify it for newcomers.
>
> My only problem with it is that it's called Bool, while every other
> programming language on Earth calls it Boolean. (Or at least, the
> languages that *have* a name for it...)
Except C++? But then again:
> But I'm far more perturbed by names like Eq, Ord, Num, Ix (??), and so
> on. The worst thing about C is the unecessary abbriviations; [sic] let's not
> copy them, eh?
I agree. I've always felt that
class EqualsClass randomTypeSelectedByTheUser => TotalOrderClass
randomTypeSelectedByTheUser where
compareXToY :: randomTypeSelectedByTheUser ->
randomTypeSelectedByTheUser -> OrderingValue
lessThanOrEqualTo :: randomTypeSelectedByTheUser ->
randomTypeSelectedByTheUser -> Boolean
lessThan :: randomTypeSelectedByTheUser -> randomTypeSelectedByTheUser
-> Boolean
was both more understandable to the reader, and easier to remember and
reproduce for the writer.
Or, in other words, leave well enough alone; we should always err in the
direction of being like C, to avoid erring in the direction of being
like Java.
jcc
More information about the Haskell-Cafe
mailing list