[Haskell-cafe] Comment Syntax
Ivan Lazar Miljenovic
ivan.miljenovic at gmail.com
Fri Jun 3 11:26:59 CEST 2011
On 3 June 2011 19:19, Guy <guytsalmaves-h at yahoo.com> wrote:
> On 03/06/2011 12:01, Malcolm Wallace wrote:
>>
>> I believe the motivating example that persuaded the Language Committee to
>> allow these symbols was
>> -->
>> which is not of course used anywhere in the standard libraries, but is an
>> extremely nice symbol to have available in user code.
>
> Seeing as no library actually defines such a symbol, is it worth forcing an
> extra space into comments? --| and --^ would be an extremely nice symbols
> for haddock comments.
We already have to forms of comments: -- and {- -}; why do we need another two?
Think of it this way: the "--" defines the comment, and then we use
the "|" or "^" to indicate to _haddock_ to interpret this differently.
I don't think we need to special-case symbols starting with "--" just
to avoid having to put a space in to delimit the comment indicator and
the markup indicator.
That said, I have a use for --> as a symbol... if it wasn't that I'd
also want something like -- to follow suit, and as such it'll just be
easier to use something like .->. and .--. (for creating directed and
undirected edges respectively in graphs).
--
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com
More information about the Haskell-Cafe
mailing list