develooper Front page | perl.perl6.language.mlc | Postings from August 2000

Re: why not just use C /* ... */ ?

From:
JVromans
Date:
August 23, 2000 13:37
Subject:
Re: why not just use C /* ... */ ?
Message ID:
m28zto53sf.fsf@phoenix.squirrel.nl
iain truskett <ict@eh.org> writes:

> It's not *that* slow. Just means the parser is looking for /* as well as
> */ ...

And "/*" and ""/*" and '/*' and qw(*/) and #*/ and \#*/ and m/.*/ ...

With MLC, you need to _parse_ the comments. What happens if you find a
unterminated quoted string in a commented out section?
Guess what happens when you have the following comment in a java
program:

   /* File: C:\user\jv\demo.java */

t.java:1: Invalid escape character.
/* File: C:\user\jv\demo.java */
           ^

With SLC, discarding a line if it starts with a # (after optional
whitespace) is straightforward, fail safe, and fast.

-- Johan



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About