[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nested comments, 1
Original-Via: uk.ac.ukc; Thu, 20 Sep 90 11:50:50 BST
From: Kent Karlsson <kent>
Date: Thu, 20 Sep 90 12:21:45 +0200
To: haskell@cs.glasgow.ac.uk
Subject: Re: nested comments, 1
Original-Sender: kent%se.chalmers.cs@sunic.sunet.se
Sender: haskell-request@cs.glasgow.ac.uk
On the first alternative
------------------------
> (1) things like "-}" inside a string may "catch" an outer nested comment, and
...
> With regard to (1), I thought I made it pretty clear in my message
> that we were making no attempt at solving that particular problem.
Yes, it was made clear, but that still does *not* make it better!!
> On the other hand, I'm not sure that I agree with Kent that it's
> reasonable to require strings in nested comments to be properly
> constructed. I can imagine writing:
WriteFile file quote -- write " to file
But the " in the line above is *not* the beginning of a string (it's
inside a to-end-of-line comment), so there would be no problem, here...
But now that you mention it, alternative 1 has to be mended once again,
since e.g.
WriteFile file ['"'] -- or do I really have to write a backslash
-- in front of the double quote sign?
still would cause a problem. (I leave the details to the reader, but
single quotes (or apostrophes if you like) must(?) now be banned from
identifiers...)
> remove the ambiguity (but I found it humorous that he initially made
> the same error (2) that was in my solution :-).
Yes, well, sorry about the error, but it was quite a different error,
though the symptoms were similar. I might find it humorous (:-) that the
ncomment syntax in the report also has *that* **and** *one other* error:
- any *never* generates "{-" nor "-}" :-) :-)
- even if that is mended, the problem still persists, due to the (outer) loop.
(This is the error I made in my first attempt at the "first alternative".)
/kn