Ivan Lazar Miljenovic 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 seen further, it is by
On 8 June 2011 18:13, Ketil Malde wrote:
> Guy 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
Guy 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 '#!'. Admittedly, this
is still a comm
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 synta
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 opera
Guy 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 ; # / ; die "this dies!";
On 07/06/2011 10:55, Ivan Lazar Miljenovic wrote:
On 7 June 2011 17:50, Guy wrote:
On 07/06/2011 10:45, Ivan Lazar Miljenovic wrote:
On 7 June 2011 17:41, Guywrote:
I originally posted because I found that --| stood out much more clearly
as
a structured comment than -- |.
How does a mi
On 7 June 2011 17:50, Guy wrote:
> On 07/06/2011 10:45, Ivan Lazar Miljenovic wrote:
>>
>> On 7 June 2011 17:41, Guy wrote:
>>> I originally posted because I found that --| stood out much more clearly
>>> as
>>> a structured comment than -- |.
>>
>> How does a missing space character make that st
On 07/06/2011 10:45, Ivan Lazar Miljenovic wrote:
On 7 June 2011 17:41, Guy 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
On 7 June 2011 17:41, Guy 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 comment too
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 "--" a
> 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
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 commen
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 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)Te
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 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 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
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
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
t
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,
"Albert Y. C. Lai" 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 PR
*Touché.* Nice one.
2011/6/4 Albert Y. C. Lai
> 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
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.
___
H
Roman Cheplyaka writes:
> * Andrew Coppin [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
* Andrew Coppin [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
> marker in the first pl
On 4 June 2011 02:02, Albert Y. C. Lai 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 comment wit
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
lang
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 Fri, Jun 3, 2011 at 05:19, Guy 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
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 dir
On 3 June 2011 20:32, Daniel Schoepe wrote:
> On Fri, 03 Jun 2011 12:19:31 +0300, Guy 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
On Fri, 03 Jun 2011 12:19:31 +0300, Guy 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
> > e
2011/6/3 Guy :
> 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. ;)
___
Haskell-Cafe mailin
On 03/06/2011 12:26, Ivan Lazar Miljenovic wrote:
On 3 June 2011 19:19, Guy 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 libra
On 3 June 2011 19:19, Guy 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 symbo
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
>> -- 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 (--|) = (+)
> Pr
On 3 June 2011 18:32, Guy 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; --| is a valid operator
On Fri, Jun 3, 2011 at 10:32, Guy 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 least, allows it.
P
40 matches
Mail list logo