Re: Perl 5 compatibility (Re: Larry's Apocalypse 1)

2001-04-06 Thread Dave Storrs



On Thu, 5 Apr 2001, John Porter wrote:

 Nathan Wiger wrote:
  the more compatible
  with Perl5 Perl6 is, the more likely it is to be accepted.
 
 I don't believe that's necessarily true.
 If Perl6 proves to be a significantly better Perl than Perl5,
 people will adopt it, especially if they're inclined toward
 the Perl philosophy anyway. (And at first, those are the only
 people we have to convince.)  To this end, sacrificing the
 Virgin of Perlish Power to the God of Backward Compatibility
 would be unwise in the extreme.

You are correct, but being backwards compatible is unlikely to
_cost_ us adherents and might well gain us some.  *shrug*

Dave




Re: Perl 5 compatibility (Re: Larry's Apocalypse 1)

2001-04-06 Thread John Porter

Dave Storrs wrote:
 being backwards compatible is unlikely to
 _cost_ us adherents and might well gain us some.

Yes, all other things being equal.  But will they be?

IOW: at what cost backwards compatibility?

-- 
John Porter




Perl 5 compatibility (Re: Larry's Apocalypse 1)

2001-04-05 Thread Nathan Wiger

Ted Ashton wrote:
 
 Thus it was written in the epistle of Michael G Schwern,
  I think [Nate]'s saying that its annoying to have to write any tag
  that says "Hey, I'm starting a new Perl 6 program here!" at the top of
  every single program, much in the same way its tiresome to write "int
  main(...)" in every C program.  Then again, we already have to do the
  #! thing.
 
 Not only is it tiresome, it really gets in the way of writing perl6
 one-liners.

Right, exactly.

 Perhaps it could be
   1) If the code uses "module" or
   2) If the executable called ends in 6.

Yep, something like this would be cool. But as Dan suggested we'll
probably have to let Larry clarify his intent here. I read it as "it
would be cool to assume that we're getting real Perl 5 code", rather
than as just assuming Perl 5 non-strict policies, but actual Perl 6
code. 

I agree with Ed that, if you think about it, parsing Perl 5 in the Perl
6 detachable-lexer-parser model shouldn't (hopefully) be any harder than
parsing Python (or Parrot :) syntax. Assuming this, then in one way
Perl5 compatibility could be a "no-brainer". But the real question is
how to distinguish Perl 5 vs 6 reliably. We could have "module main",
but like Schwern, my left eye starts twitching and I get hot flashes
with "int main" hallucinations. 

Anyways, it's probably something worth pondering, as the more compatible
with Perl5 Perl6 is, the more likely it is to be accepted. The more I've
been thinking about the p52p6 translator, the more it bothers me. I just
think of the different Fortran versions and that whole mess.

-Nate



Re: Perl 5 compatibility (Re: Larry's Apocalypse 1)

2001-04-05 Thread John Porter

Nathan Wiger wrote:
 the more compatible
 with Perl5 Perl6 is, the more likely it is to be accepted.

I don't believe that's necessarily true.
If Perl6 proves to be a significantly better Perl than Perl5,
people will adopt it, especially if they're inclined toward
the Perl philosophy anyway. (And at first, those are the only
people we have to convince.)  To this end, sacrificing the
Virgin of Perlish Power to the God of Backward Compatibility
would be unwise in the extreme.
Put simply, I'd take Conway's Perl6 Power Extension Pack
over the ability to run my existing programs (which work
just fine under my (still functioning) perl5, thanks) under
perl6 any day.

Put abstractly, if I perceive Perl6 as a new-and-improved,
yet vaguely incompatible, upgrade to Perl5, I am much less
inclined to adopt it that if I perceive it as a bold
stride above and away from Perl5.

-- 
John Porter




Re: Perl 5 compatibility (Re: Larry's Apocalypse 1)

2001-04-05 Thread Dan Sugalski

At 02:43 PM 4/5/2001 -0700, Nathan Wiger wrote:
Yep, something like this would be cool. But as Dan suggested we'll
probably have to let Larry clarify his intent here.

Somewhere or other Larry talked about this. Might've been in LA1, might've 
been somewhere else.

I read it as "it
would be cool to assume that we're getting real Perl 5 code", rather
than as just assuming Perl 5 non-strict policies, but actual Perl 6
code.

I agree with Ed that, if you think about it, parsing Perl 5 in the Perl
6 detachable-lexer-parser model shouldn't (hopefully) be any harder than
parsing Python (or Parrot :) syntax.

To be honest, if we lop out some of the nastier bits of perl 5 that have 
been contemplated, then making perl 6 grok code that uses them will be 
reasonably non-trivial.

Besides, I really do *not* want to have perl 6 fully compatible with all 
perl 5 source for another reason. If we say we're not, but some perl 5 code 
does parse and run, then we get nice brownie points. If, on the other hand, 
we say we *are* perl 5 compatible, every single silly little 
incompatibility will be a black mark. Perl 5 is enough of a moving, poorly 
defined, target that I'd rather not shoot directly at it.

Which isn't to say I'd be against a parser plug-in on CPAN that ate perl 5 
code--that'd be rather cool. I just don't want to promise that perl 6 will 
eat all perl 5 code.

Dan

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




Re: Perl 5 compatibility (Re: Larry's Apocalypse 1)

2001-04-05 Thread James Mastros

OK, there's probably somthing simple I'm missing here, but...

1. Cuse 5 or Cuse 6 (and, in general, Cuse vervect) import the
   definitions of the language as it existed at that time (more or less), or
   die if they can't.  (Or run through p52p6, or whatever.)
   
   Advantage: matches existing precedent.  The real perl 5 won't choke on
   it, and will even give the right error.

2. If the name of the executable (from argv[0] or the beginning of #!)
   contains "perl.?[56]", then there is an implicit Cuse 5 or Cuse 6.
   (And why not any other version number? Just don't ship them in core,
   please!)

   Advantage: reasonably non-intrusive.

3. Otherwise, assume perl 6.
   
   Advantage: we require trivial changes in existing scripts instead of
   baggage we'll be carrying around forever.
   
   If you object to that much change as an admin, feel free -- install perl6
   under the name "perl6", symlink perl5 to it, and make a symlink from perl
   to perl5.  (This would work only if we had #2 follow symlinks until it
   saw a "perl5" or "perl6", which is probably fine).
   
   If you don't have symlinks on your system, then get a better system, use
   a site-policy file, or bite the bullet and change the #! lines.
   
 -=- James Mastros
-- 
The most beautiful thing we can experience is the mysterious.  It is the
source of all true art and science.  He to whom this emotion is a stranger,
who can no longer pause to wonder and stand wrapt in awe, is as good as dead.
-=- Albert Einstein
AIM: theorbtwo   homepage: http://www.rtweb.net/theorb/