At 02:58 PM 4/15/2001 +0100, Simon Cozens wrote:
>On Sat, Apr 14, 2001 at 10:39:55AM -0400, Dan Sugalski wrote:
> > >To solve this versioning issue, is there a way Perl 6 compiler can just
> > >figure out what's being fed?
> >
> > Why?
>
>i) To make things easier for the programmer. (That's kinda the point of
>Perl.)

If the programmer wants perl 5, then he/she/it/they should *use* perl 5. 
It's not going to rot.

>ii) Because Larry said so, *and* declared how to do it:
>
>    I hereby declare that a package declaration at the front of a file
>    unambiguously indicates you are parsing Perl 5 code. If you want to
>    write a Perl 6 module or class, it'll start with the keyword module or
>    class.

Grand. To play devil's advocate here for a moment, that doesn't mean that 
perl 6 will parse or run the code. He could have said that putting a 
"language Modula_2;" in your source declares that from that point on the 
code is Modula-2. That doesn't mean we'll parse and run it.

There are a number of reasons to *not* claim to parse perl 5 code.

*) We won't load any perl 5 XS code
*) We won't be getting the corner cases, and perl5 has a *lot*.
*) It complicates the interpreter if we need to add code to support things 
that perl 6 doesn't do. (*ocugh*typegobs*cough*)
*) It makes the parser that much more work to write. Even if we switch 
parser code entirely when going from perl 5 to perl 6 and back, someone 
still has to write the code in the first place.
*) It's even more complexity, which is just that much more stuff we can 
potentially break
*) It sets up the expectation (rightly so, IMNSHO) in the user community 
that we eat and process all perl 5 code correctly, and we just aren't going 
to. Despite our best efforts we're not going to.

Larry may unambiguously declare that we will do it, and if he does (and he 
hasn't yet) we will. I won't like it, but that's what I signed up for, so 
that's fine. I just don't think we should, and if we do we need to be 
*very* explicit about what we mean by "perl 5 code".

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to