On Tue, 14 Mar 2000, George Russell wrote:

> "D. Tweed" wrote:
> > * Comments that actually contain meta-program information, eg pragmas
> The Haskell standard system for putting information for the compiler in
> things which look like comments is obnoxious, but fortunately not _very_
> common.  I don't think it justifies adding yet another comment notation for
> Haskell.   If you compile with unlit and with cpp, like a lot
> of GHC, there must be at least 4 ways of distinguishing information for
> humans from information for the compiler, which seems to me excessive.
> Yet again I feel that the language would be improved by taking things out
> rather than adding more things.  In my opinion you could get by very well
> in Haskell with just "--".

I'm with you on the pragmas in comments. However, I think we're perhaps
talking at cross purposes: I was thinking more along the lines of
conventions that would allow useful tools to be written. Having them
widely accepted means that it's actually worth writing the tools and
because it's just a convention you don't have to use them, the only caveat
being that if you don't use them you obviously can't expect to be able to
use any tools that happen do be written that _do_ need them (e.g., auto
find english description of function in an IDE, etc). If you were to
change to saying `as far as Haskell itself goes, comments occur within {-
-} braces' then it might be adopted that {- !! denotes a long comment,
{- ! denotes a short comment (in the sense that it should be displayed
inline),  {- ? for an assertion (which may not be computable, hence why it
isn't done an Haskell code) which could be extracted by a
program-correctness prover, etc, with just plain {- being `unknown but
probably just haskell code that's currently commented out'. I find I do a
lot of stuff in my (bigger) C++ projects involving various notations
within comments that perl scripts can then use to do various kinds of
things (eg, I automatically generate most of my header files, marking
exported prototypes with /*exported*/). What I'm basically saying is that
I agree having the compiler know about different kinds of comments is
unnecessary work, but just having one amorphous comment class seems to
rule out lots of useful stuff.

___cheers,_dave________________________________________________________
www.cs.bris.ac.uk/~tweed/pi.htm|ALERT: you are communicating with an
email: [EMAIL PROTECTED]     |unsavoury individual with a copy of gdb
work tel: (0117) 954-5253      |who reverse-engineered a file format.

Reply via email to