Comment Syntax

Manuel M T Chakravarty chak at
Wed Feb 1 19:40:26 EST 2006

I am against such a change.  The change would break existing software
(eg, Yampa) and secondly I don't buy the "main sources of  
confusion for beginners" argument.  The confusion arises only when a
single line comment is used to uncomment a set of characters that start
with a special symbol.  That's a situation that doesn't arise that
often.  (I'd actually be very happy if the main sources of confusion fpr
beginners where of such simple syntactic nature.)

As for consistency, well if you absolutely want to make it consistent,
impose the same rule on {- as on --.


> My proposal is to make any text beginning '--' a comment (rather than  
> requiring a space after the two dashes.  I appreciate that the  
> argument against this is that various operators that look like this  
> are useful (e.g. -->).  However I think that any benefit gained by  
> operators like this is lost in confusion.
> In order to back up my suggestion, I'd like to point out, that this  
> is indeed already how it is done for block comments.  i.e. we do not  
> expect {-> to be an operator, we expect it to be the beginning of a  
> comment.
> Secondly, from my limited experience helping to teach Haskell, the  
> comment syntax is a primary source of confusion for beginners.   
> Beginners inevitably forget (or don't know) to add the space, and  
> will receive confusing errors about undefined symbols, or type  
> mismatches.  This is made yet more confusing by the fact that the  
> compiler appears to be pointing at an error in a comment.
> Thanks
> Tom Davie
> _______________________________________________
> Haskell-prime mailing list
> Haskell-prime at

More information about the Haskell-prime mailing list