Ted Ashton wrote:
> 
> Thus it was written in the epistle of Michael G Schwern,
> > I think [Nate]'s saying that its annoying to have to write any tag
> > that says "Hey, I'm starting a new Perl 6 program here!" at the top of
> > every single program, much in the same way its tiresome to write "int
> > main(...)" in every C program.  Then again, we already have to do the
> > #! thing.
> 
> Not only is it tiresome, it really gets in the way of writing perl6
> one-liners.

Right, exactly.

> Perhaps it could be
>   1) If the code uses "module" or
>   2) If the executable called ends in 6.

Yep, something like this would be cool. But as Dan suggested we'll
probably have to let Larry clarify his intent here. I read it as "it
would be cool to assume that we're getting real Perl 5 code", rather
than as just assuming Perl 5 non-strict policies, but actual Perl 6
code. 

I agree with Ed that, if you think about it, parsing Perl 5 in the Perl
6 detachable-lexer-parser model shouldn't (hopefully) be any harder than
parsing Python (or Parrot :) syntax. Assuming this, then in one way
Perl5 compatibility could be a "no-brainer". But the real question is
how to distinguish Perl 5 vs 6 reliably. We could have "module main",
but like Schwern, my left eye starts twitching and I get hot flashes
with "int main" hallucinations. 

Anyways, it's probably something worth pondering, as the more compatible
with Perl5 Perl6 is, the more likely it is to be accepted. The more I've
been thinking about the p52p6 translator, the more it bothers me. I just
think of the different Fortran versions and that whole mess.

-Nate

Reply via email to