> I don't want to argue about the design of perl6[1], I just wonder: why
> the semicolon is still needed in the end of lines in perl6?

JavaScript allows to omit semicolumn. In lecture at Yahoo's YUI
Theatre one of JS's gurus talked about how it is organized in
JavaScript parser.

If the line of code is not ended with ';' the parser tries first
to assume that the next line continues current one. If then syntax error
occurs, the parser _goes_back_ and make another asumption that previous
line was ended with semicolumn.

Probably there are much more than one way to implement ';'-less but it
either slows down the compiler or makes grammar more complex.

And in fact Perl 6 already allows not to type ';' at the end of
{block} ;-)

The following simple snippets work correctly with Pugs and perl5:

#### perl 6
sub debug ($value)
    say $value
debug 'me'

##### perl 5
sub debug
   print shift
debug 'me'

And finally, Perl is not an Assembler with one only instrucion per

Andrew Shitov
[EMAIL PROTECTED] | http://www.shitov.ru

Reply via email to