Re: Compatibility with perl 5

2004-04-13 Thread David Cantrell
On Tue, Apr 13, 2004 at 09:16:21AM -0600, Thomas A. Boyer wrote: > The original question was "how do I label my code as Perl 5?" The > correct answer, according to Apocalypse 1, is to start your source with > "package." If you didn't want to put your code in a package, then start > it with "pack

Re: Compatibility with perl 5

2004-04-13 Thread Aaron Sherman
On Tue, 2004-04-13 at 11:16, Thomas A. Boyer wrote: > Here is the relevant paragraph from the apocalypse: > 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

Re: Compatibility with perl 5

2004-04-13 Thread Matthew Walton
Thomas A. Boyer wrote: The original question was "how do I label my code as Perl 5?" The correct answer, according to Apocalypse 1, is to start your source with "package." If you didn't want to put your code in a package, then start it with "package main". The other question was "how do I label

Re: Compatibility with perl 5

2004-04-13 Thread Thomas A. Boyer
Matthew Walton wrote: Thomas A. Boyer wrote: Matthew Walton wrote: That could be problematic, because if Perl 6 sees something like: my %myhash; %myhash{'foo'} = 'bar'; It's going to think 'ahah', perl 5'. Because it doesn't contain any Perl 6 keyword (such as 'module' or 'class'), as Mark sai

Re: Compatibility with perl 5

2004-04-13 Thread Dan Sugalski
At 4:07 PM +0100 4/13/04, Matthew Walton wrote: Thomas A. Boyer wrote: Matthew Walton wrote: That could be problematic, because if Perl 6 sees something like: my %myhash; %myhash{'foo'} = 'bar'; Is it going to think 'ahah, perl 6' or 'perl 5 with errors'? It's going to think 'ahah', perl 5'. Be

Re: Compatibility with perl 5

2004-04-13 Thread Luke Palmer
David Cantrell writes: > A few days ago I briefly discussed with Nicholas Clark (current perl 5.8 > pumpking) about making perl5 code forward-compatible with perl6. A > quick look through the mailing list archives didn't turn up anything > obvious, and I don't recall any mechanism being presented

Re: Compatibility with perl 5

2004-04-13 Thread Matthew Walton
Thomas A. Boyer wrote: Matthew Walton wrote: That could be problematic, because if Perl 6 sees something like: my %myhash; %myhash{'foo'} = 'bar'; Is it going to think 'ahah, perl 6' or 'perl 5 with errors'? It's going to think 'ahah', perl 5'. Because it doesn't contain any Perl 6 keyword (su

Re: Compatibility with perl 5

2004-04-13 Thread Thomas A. Boyer
Matthew Walton wrote: Mark J. Reed wrote: On 2004-04-13 at 13:16:02, David Cantrell wrote: Perl 6, we are promised, will try to run "legacy" code unchanged. How will it spot such legacy code? My understanding has been that perl6 will assume a program is Perl 5 unless it sees a Perl 6 keywo

Re: Compatibility with perl 5

2004-04-13 Thread David Cantrell
On Tue, Apr 13, 2004 at 02:27:08PM +0200, Juerd wrote: > David Cantrell skribis 2004-04-13 13:16 (+0100): > > Perl 6, we are promised, will try to run "legacy" code unchanged. How > > will it spot such legacy code? Doing this reliably is a hard problem, > > but we can make it easier. I suggest t

Re: semantic and implementation of pairs

2004-04-13 Thread Stéphane Payrard
I have confused assignement and initialisation in my previous mail. Because they are two different operations, there is no problem they have different semantics. A6 described both operations. It described pairs as arguments used to initialize parameters and pairs in assignement. -- stef

Re: Compatibility with perl 5

2004-04-13 Thread Juerd
David Cantrell skribis 2004-04-13 13:16 (+0100): > Perl 6, we are promised, will try to run "legacy" code unchanged. How > will it spot such legacy code? Doing this reliably is a hard problem, > but we can make it easier. I suggest that people put: > use perl5; Why change what already works?

Re: Compatibility with perl 5

2004-04-13 Thread Matthew Walton
Mark J. Reed wrote: On 2004-04-13 at 13:16:02, David Cantrell wrote: Perl 6, we are promised, will try to run "legacy" code unchanged. How will it spot such legacy code? My understanding has been that perl6 will assume a program is Perl 5 unless it sees a Perl 6 keyword such as 'module' or 'c

Re: Compatibility with perl 5

2004-04-13 Thread Mark J. Reed
On 2004-04-13 at 13:16:02, David Cantrell wrote: > Perl 6, we are promised, will try to run "legacy" code unchanged. How > will it spot such legacy code? My understanding has been that perl6 will assume a program is Perl 5 unless it sees a Perl 6 keyword such as 'module' or 'class'. -- Mark

Compatibility with perl 5

2004-04-13 Thread David Cantrell
A few days ago I briefly discussed with Nicholas Clark (current perl 5.8 pumpking) about making perl5 code forward-compatible with perl6. A quick look through the mailing list archives didn't turn up anything obvious, and I don't recall any mechanism being presented in any of the Apocalypses, so .