Re: why not just use C /* ... */ ?
[email protected] ((Johan Vromans)) 23 Aug 2000 18:40:48 +0200
| Newsgroups | perl.perl6.language.mlc |
|---|---|
| Message-ID | <[email protected]> |
iain truskett <[email protected]> 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