[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "literate" comments

I have been following the recent discussions on "literate style" of
programming and I fail to see the purpose of making this part of the
language.  As Mr. Dalton suggested, a preprocessor to separate code lines
from literate lines can easily be written.  But I think this should be a
agreed upon convention and not part of the language.

As for literate programming (and I admit these remarks come only from my
experience with Web programs) it's a good idea but I'm afraid it has a
few problems.

        1.  Not everyone uses the same typesetter as you.  Therefore to
            be useful to the greatest number of people, your comments
            should be in straight text.  Therefore why not just use the
            regular comment structure of the language.

        2.  If your literate comments are in say a Latex format, they are
            probably unreadable until run thought the proper typesetting
            program (try reading a raw, unprocessed man page sometime).
            And unless you have more than a dumb terminal on your desk,
            it is unreadable until printed.  Assuming of course you have
            more than a impact print easily available that can handle all
            the different fronts people love to use.

I was taught that comments should be used often, but "by the same token"
should contain only relative and useful information.  The current comment
system of Haskell is fine for these requirements.

It has been less than 2 years since Version 1.0 of Haskell was released,
with Version 1.2 coming soon.  In my opinion, people are wanting to "put
the cart before the horse".  Literate comments and other "bells and whistles"
should wait a few years until the semantic quirks (the module system for
example) have been worked out of Haskell and it becomes a stable, well
defined language.