Comment Syntax

Lennart Augustsson lennart at
Mon Jan 30 07:21:08 EST 2006

That's the way it used to be, and I agree it's more consistent.

Thomas Davie wrote:
> I would like to suggest a different change to single line comment  
> syntax to do two things.  First, address an inconsistency with multi  
> line comments, and secondly remove one of the main sources of  confusion 
> for beginners.
> 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