Guy guytsalmave...@yahoo.com writes:
Out of interest, is there any other language where the comment
delimiter is invalid if immediately followed by a symbol?
Another quaint example, in shell scripts, lines starting with '#' are
comments, except when the first line starts with '#!'.
On 8 June 2011 18:13, Ketil Malde ke...@malde.org wrote:
Guy guytsalmave...@yahoo.com writes:
Out of interest, is there any other language where the comment
delimiter is invalid if immediately followed by a symbol?
Another quaint example, in shell scripts, lines starting with '#' are
Ivan Lazar Miljenovic ivan.miljeno...@gmail.com writes:
And #! in the first line is also treated as a comment in Haskell code
so that you can run it as a script.
True. But then you're allowed to add arbitrary symbols after it, I
think. At least, GHC seems happy about it.
-k
--
If I haven't
On 06/06/2011 22:14, Evan Laforge wrote:
Back to Haskell: I agree, the choice of the comment delimiter was not the
best in light of the possibility to define operators containing it as a
substring. But changing it to have --| start a comment too might break
too much code (and eliminating -- as a
On 7 June 2011 17:41, Guy guytsalmave...@yahoo.com wrote:
On 06/06/2011 22:14, Evan Laforge wrote:
Back to Haskell: I agree, the choice of the comment delimiter was not the
best in light of the possibility to define operators containing it as a
substring. But changing it to have --| start a
On 07/06/2011 10:45, Ivan Lazar Miljenovic wrote:
On 7 June 2011 17:41, Guyguytsalmave...@yahoo.com wrote:
On 06/06/2011 22:14, Evan Laforge wrote:
Back to Haskell: I agree, the choice of the comment delimiter was not the
best in light of the possibility to define operators containing it as
On 7 June 2011 17:50, Guy guytsalmave...@yahoo.com wrote:
On 07/06/2011 10:45, Ivan Lazar Miljenovic wrote:
On 7 June 2011 17:41, Guyguytsalmave...@yahoo.com wrote:
I originally posted because I found that --| stood out much more clearly
as
a structured comment than -- |.
How does a
On 07/06/2011 10:55, Ivan Lazar Miljenovic wrote:
On 7 June 2011 17:50, Guyguytsalmave...@yahoo.com wrote:
On 07/06/2011 10:45, Ivan Lazar Miljenovic wrote:
On 7 June 2011 17:41, Guyguytsalmave...@yahoo.comwrote:
I originally posted because I found that --| stood out much more clearly
Guy guytsalmave...@yahoo.com writes:
Out of interest, is there any other language where the comment
delimiter is invalid if immediately followed by a symbol?
Perl has a rather infamous example where the comment syntax may depend
on run-time properties - would that count?
whatever / 25 ;
On 07/06/2011 10:55, Ivan Lazar Miljenovic wrote:
Another argument against special-casing --|: what happens if you
want to use a _different_ documentation generator (I don't know why
you would, but someone might) than Haddock, which uses a different
markup identifier?
We can declare new
On 7/06/2011, at 9:36 PM, Guy wrote:
Out of interest, is there any other language where the comment delimiter is
invalid if immediately followed by a symbol?
Not exactly what you asked, but in some implementations of Algol,
comment This is a comment;
commentThis is a syntax
On 4/06/2011, at 5:12 AM, Andrew Coppin wrote:
I'm curious to know why anybody thought that -- was a good comment marker
in the first place. (I'm curious because Haskell isn't the only language to
have made this strange choice.)
Indeed. The Wikipedia lists
Euphoria, Haskell, SQL, Ada,
This whole discussion is reminding me of Wadler's Law of Language
Design [1], it's nice to see that in 15 years things haven't changed
much!
WADLER'S LAW OF LANGUAGE DESIGN
In any language design, the total time spent discussing
a feature in this list is proportional to two raised to
Nicolas Wu schrieb:
This whole discussion is reminding me of Wadler's Law of Language
Design [1], it's nice to see that in 15 years things haven't changed
much!
WADLER'S LAW OF LANGUAGE DESIGN
In any language design, the total time spent discussing
a feature in this list is
Bearing in mind that the characters that have been used to begin
end of line comments include *, /, ;, !, #, %, and $, it's not
clear that there's anything _that_ regrettable about -- .
Recall that the problem is not with isolated characters, but whole strings.
-- a is a comment, --a is a
On Montag, 6. Juni 2011, 19:08, Albert Y. C. Lai wrote:
Bearing in mind that the characters that have been used to begin
end of line comments include *, /, ;, !, #, %, and $, it's not
clear that there's anything _that_ regrettable about -- .
Recall that the problem is not with isolated
On 2011-06-06 13:08 -0400, Albert Y. C. Lai wrote:
Recall that the problem is not with isolated characters, but whole strings.
[...]
in LaTeX, %%@#$^* is a comment.
This example probably does not help your position.
Since (La)TeX allows the comment character to be changed at any time,
the
On 2011-06-06 13:39 -0400, Nick Bowler wrote:
On 2011-06-06 13:08 -0400, Albert Y. C. Lai wrote:
Recall that the problem is not with isolated characters, but whole strings.
[...]
in LaTeX, %%@#$^* is a comment.
This example probably does not help your position.
Since (La)TeX allows the
On 11-06-06 01:34 PM, Daniel Fischer wrote:
On Montag, 6. Juni 2011, 19:08, Albert Y. C. Lai wrote:
Recall that the problem is not with isolated characters, but whole
strings.
-- a is a comment, --a is a comment, but ---a is not.
It is. Report, section 2.3:
Sorry. Then --| is not a
On Monday 06 June 2011, 19:51:44, Albert Y. C. Lai wrote:
On 11-06-06 01:34 PM, Daniel Fischer wrote:
On Montag, 6. Juni 2011, 19:08, Albert Y. C. Lai wrote:
Recall that the problem is not with isolated characters, but whole
strings.
-- a is a comment, --a is a comment, but ---a is
Back to Haskell: I agree, the choice of the comment delimiter was not the
best in light of the possibility to define operators containing it as a
substring. But changing it to have --| start a comment too might break
too much code (and eliminating -- as a comment starter would certainly
break
Albert Y. C. Lai tre...@vex.net writes:
On 11-06-04 02:20 AM, Roman Cheplyaka wrote:
It is, for my taste, a good comment marker, because of its resemblance
to a dash. It makes the code look like real text:
let y = x + 1 -- increment x
COBOL is real text, if that is what you want.
MOVE
* Andrew Coppin andrewcop...@btinternet.com [2011-06-03 18:12:04+0100]
On 03/06/2011 05:02 PM, Albert Y. C. Lai wrote:
I propose that only {- -} is comment; that is, -- is an operator token
and not a marker of comments.
I'm curious to know why anybody thought that -- was a good comment
Roman Cheplyaka r...@ro-che.info writes:
* Andrew Coppin andrewcop...@btinternet.com [2011-06-03 18:12:04+0100]
On 03/06/2011 05:02 PM, Albert Y. C. Lai wrote:
I propose that only {- -} is comment; that is, -- is an operator token
and not a marker of comments.
I'm curious to know why
On 11-06-04 02:20 AM, Roman Cheplyaka wrote:
It is, for my taste, a good comment marker, because of its resemblance
to a dash. It makes the code look like real text:
let y = x + 1 -- increment x
COBOL is real text, if that is what you want.
___
*Touché.* Nice one.
2011/6/4 Albert Y. C. Lai tre...@vex.net
On 11-06-04 02:20 AM, Roman Cheplyaka wrote:
It is, for my taste, a good comment marker, because of its resemblance
to a dash. It makes the code look like real text:
let y = x + 1 -- increment x
COBOL is real text, if that
-- followed by a symbol does not start a comment, thus for example, haddock
declarations must begin with -- |, and not --|.
What might --| mean, if not a comment? It doesn't seem possible to define it as
an operator.
___
Haskell-Cafe mailing list
On Fri, Jun 3, 2011 at 10:32, Guy guytsalmave...@yahoo.com wrote:
-- followed by a symbol does not start a comment, thus for example, haddock
declarations must begin with -- |, and not --|.
What might --| mean, if not a comment? It doesn't seem possible to define it
as an operator.
GHCi, at
On 3 June 2011 18:32, Guy guytsalmave...@yahoo.com wrote:
-- followed by a symbol does not start a comment, thus for example, haddock
declarations must begin with -- |, and not --|.
What might --| mean, if not a comment? It doesn't seem possible to define it
as an operator.
Sure you can; --|
-- followed by a symbol does not start a comment, thus for example, haddock
declarations must begin with -- |, and not --|.
What might --| mean, if not a comment? It doesn't seem possible to define it
as an operator.
GHCi, at least, allows it.
Prelude let (--|) = (+)
Prelude 1 --| 2
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
On 3 June 2011 19:19, Guy guytsalmave...@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
On 03/06/2011 12:26, Ivan Lazar Miljenovic wrote:
On 3 June 2011 19:19, Guyguytsalmave...@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
2011/6/3 Guy guytsalmave...@yahoo.com:
I wasn't proposing additional comment symbols; I'm proposing that anything
beginning with -- is a comment.
I use -- as a infix operator to describe types in Template Haskell.
So I too oppose your proposal. ;)
On Fri, 03 Jun 2011 12:19:31 +0300, Guy guytsalmave...@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,
On 3 June 2011 20:32, Daniel Schoepe daniel.scho...@googlemail.com wrote:
On Fri, 03 Jun 2011 12:19:31 +0300, Guy guytsalmave...@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
Am 03.06.2011 10:32, schrieb Guy:
What might --| mean, if not a comment? It doesn't seem possible to
define it as an operator.
Obviously, anyone who is going to write a formal logic framework would
want to define the following operators ;) :
T |- phi: T proves phi
T |-- phi: T proves phi
On Fri, Jun 3, 2011 at 05:19, Guy guytsalmave...@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
I propose that only {- -} is comment; that is, -- is an operator token
and not a marker of comments.
Two birds in one stone:
1. Removes the cause of the mistake of writing a haddock comment as --|
That is, if no one writes any comment with -- then no one writes any
haddock comment with --|
On 03/06/2011 05:02 PM, Albert Y. C. Lai wrote:
I propose that only {- -} is comment; that is, -- is an operator token
and not a marker of comments.
I'm curious to know why anybody thought that -- was a good comment
marker in the first place. (I'm curious because Haskell isn't the only
On 4 June 2011 02:02, Albert Y. C. Lai tre...@vex.net wrote:
I propose that only {- -} is comment; that is, -- is an operator token and
not a marker of comments.
Two birds in one stone:
1. Removes the cause of the mistake of writing a haddock comment as --|
That is, if no one writes any
41 matches
Mail list logo