On 23 Nov, Graeme Moss wrote:
>
> So no one minds that `--(Nothing)' is a comment whereas `--?Nothing?'
> is not a comment?
I think that this highlights the fact that the top-bit-set characters
were put into the language with relatively few distinctions; ASCII
brackets (){}[] are not included in symbol, but those in the rest of
unicode are (ambiguously; "Any unicode symbol or punctuation" seems to
include ? to me). I don't think Haskell 98 should do anything about
this.
> And that `--Copyright 1998' is a comment whereas `--? 1998' is not a
> comment?
While I might regard the first of these as bad style, I don't have any
difficulty seeing that the second is not a comment. People used to
lisp might be irritated by the error messages they get from things like
tree-reduce f t = whatever
but given that Haskell allows symbols to be adjacent, I think the new
comment rule is correct.
> Or that sequences like `--?What' and `--!Wow' are not comments?
Grammatically and typographically nasty anyway!
> I had to consult the syntax report in order to determine whether these
> were comments or not... at least with the old system I could tell
> immediately.
I think that's just a matter of getting used to it. The new rule makes
the lexemes --, ---, ----, ... into comment introducers and treats -
the same as other characters otherwise (unless I'm mistaken!), so it's
easier for someone to see that
a --> b
is an expression now. The previous rule was visually confusing.
> Apologies if this is dragging up old arguments.
Likewise!
--
Jon Fairbairn [EMAIL PROTECTED]