Comment Syntax

Antti-Juhani Kaijanaho antti-juhani at kaijanaho.info
Mon Jan 30 09:01:12 EST 2006


Thomas Davie wrote:
> Except that there is a good reason (pos two) why the language is  wrong
> - it's inconsistant with the other comment syntax, and it's  confusing
> to newbies.

I tend to think of "--" as a reserved word in the same sense as "case"
is a reserved word. Hence, -- starts a comment, --> doesn't. The opening
brace ({) is not a symbol character, so {- is in the same category as
the semicolon, special symbol, not a reserved word.

I was actually delighted to learn that it works like this.

For newbies, just tell them that "-- " is the comment starter. It works
well enough, and newbies get a lot of other half-truths, so it's nothing
earth-shattering :)



More information about the Haskell-prime mailing list