On Wed, 2004-04-14 at 21:23, Gregor N. Purdy wrote: > Lets try that again, since I think you parsed my email in a way I > didn't intend (and its at least 50% my fault)
Hey! *I* have to step up for 50% of the blame now? Where's my lawyer! ;-) > In my opinion, starting a script with "#!/usr/bin/perl6" should force > the interpreter to treat it like Perl 6, and if it does anything else > that's just ugly. I disagree, but it's a point of aesthetics that I'm willing to concede as "ugly to some, perhaps many, perhaps most". > I don't see any need to have a program start out as a potentially Perl 5 > program and then determine that it should really be thought of as Perl 6 > and switch personalities. That is, I don't see a need for this: > > #!/usr/bin/perl > use 6; I think you meant perl5 there... I will assume you did. Ok, yes I see your point. Taking from what I said earlier: #!/usr/bin/perl5 should probably be sugar for: #!/usr/bin/perl use 5; Which means that #!/usr/bin/perl5 use 6; translates to: #!/usr/bin/perl use 5; use 6; Your (p6l) call as to if that should be an error or not. At the very least, I bow to the wisdom of it being a warning (perhaps optional). > #!/usr/bin/perl6 > > ... # Perl 6 stuff here > > use 5; # or, whatever > > # Perl 5 stuff here > > no 5; # or, whatever Oh please, please, please no! At the very least, force that to be lexically scoped as Larry suggested, but I beg of you to not even go that far. Allowing parser re-definition on the fly is one thing, but providing a handy tool that can be thrown inline anywhere by people who don't yet "feel comfy" with Perl 6, that does it all for you, is asking for a level of pain which I'd have to consult a scorned woman on, cause I know it's gonna be at least a touch worse than hell trying to maintain that code :-/ The problem is not the syntax, or even really the grammar, but the semantics... Parrot lets you smooth out the semantics to a subroutine / class / method / data access level, but to allow such free-form mixing is gonna be ugly. My personal feeling is that use 5; ... anything else ... use 6; should be an error, and if you want to write your own support for "My5" and "My6" which don't give an error, CP6?PAN6?'s doors will be wide open. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback