Larry Wall wrote:
> It's only a problem when some tries to write
>
>     .=#( ... :-)

[tries to grok the meaning of "$foo.=#(Hello, World!)"]
[fails]

> : All true.  But it avoids the headache of figuring out whether "..#" is
> : supposed to parse as a double-dot followed by a line-gobbling comment
> : or as a single dot followed by a delimited comment.
>
> One-pass, longest-token parsing says it has to be a .. followed by
> a # comment.  No headache, really.  And nobody in their right mind
> would write that anyway.

Many perl programmers aren't in their right mind.  :)

Seriously, the question is which paradigm makes more sense: a null
method (dot precedes pound), or a special kind of comment (dot follows
pound)?  The former emphasizes the "you don't have to put it at the
end of a line" aspect, while the latter emphasizes the "you can strip
it out without harming the surrounding code" aspect.  IMHO, the latter
is the more important point to emphasize - especially since the former
brings so much baggage with it.

And I suspect that the confusion between # and #."" would be minor,
_especially_ with syntax highlighters and the like in common use.

--
Jonathan Lang

Reply via email to