Dan Sugalski writes:
: At 10:16 AM 4/17/2001 +0100, Tim Bunce wrote:
: >On Mon, Apr 16, 2001 at 02:49:07PM -0500, Jarkko Hietaniemi wrote:
: > > People seem to think that telling Perl 5 apart from Perl 6 is trivial.
: >
: >My reading of Larry's comments is that it will be _made_ trivial at the
: >file scope level. If the file doesn't start with Perl 6 thingy then
: >it's Perl 5. Period.
:
: I think you (and we) are reading too much into the comments around this.
: They're all in the "RFC 16: Keep default Perl free of constraints such as
: warnings and strict" section. I've been reading them as setting perl's
: default warning and stricture levels, but that's not necessarily the intent.
Well, it was in A1 because it addressed large issues, some of which I
punted on. In particular, the degree of stricture in the main program
when we know it's Perl 6.
: As for default perl 5-ishness, while there's language that says we assume
: perl 5, there's also a paragraph in there that says having to declare we're
: really perl 6 sucks, too.
I think it's going to turn out pretty easy to distinguish Perl 5 from
Perl 6 (the standard dialect).
Consider that in Perl 6, modules might not be imported with "use".
Instead, they will might well be declared with "my" and "our" to
indicate whether you want the module definition to be scoped to your
current package or your current lexical scope.
So a Perl 6 program that wanted to invoke the "bad" pragma might start out:
my bad;
:-)
We know the use syntax has to change anyway to deal better with versioning
and aliasing, so we might as well break it correctly. We may end up with
aliased modules looking like this:
my http is Foo::Bar::Http:GSAR:3.0.1 <args>...
As for what we currently do with "use", I'm not sure the exact syntax
yet, but since "use" currently imports ordinary modules to the package
space, the p526 translator might turn non-pragmas into some kind of an
"our" declaration.
Anyway, just some more ballistic ideas to randomize all your eyeballs.
Larry