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'. Because it doesn't contain any Perl 6 keyword (such as 'module' or 'class'), as Mark said.

But then trying to process that as Perl 5 will result in an error. This doesn't seem particularly sane to me. Will we have to say


use 6;

on all Perl 6 programs to avoid this kind of thing?

Forgive me if I'm missing something obvious here.

You're not, and there is no guaranteed universal heuristic. Being explicit, via command line switches or executable names, is the prudent way to go.
--
Dan


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

Reply via email to