Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #111971
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Can Python learn from Perl? Perl 5 can now run Perl 6 code |
| Date | 2016-07-28 17:48 +1000 |
| Message-ID | <mailman.28.1469692121.10276.python-list@python.org> (permalink) |
| References | <5799b283$0$11118$c3e8da3@news.astraweb.com> <CAPTjJmqLrFM=er+S=kemSchwhMgYHbVkMB6q2BpgFfnhjKE9aw@mail.gmail.com> |
On Thu, Jul 28, 2016 at 5:21 PM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > Perl 5.24 is now 100% forwards compatible with Perl 6. > > The Perl community is agreed that Perl 6 is, in fact, a completely different > language than Perl 5. Unlike Python 3 which differs only in a few minor (but > important) ways from Python 2, Perl 6 is a significant break from the past, > enough to justify calling it a different language and not just a backwards- > incompatible version change. And yet Perl 5 now can run Perl 6 scripts. > > > Well, kinda sorta. I'm not really pulling your leg. But Perl has a feature that > if you tell it to run a file with a hashbang line, it will call the given > executable to run that file. That's now been improved to recognise Perl6 as an > external executable, instead of trying to run it as Perl 5 code. > > https://metacpan.org/pod/distribution/perl/pod/perldelta.pod#Hashbang-redirection-to-Perl-6 > > > Should Python do something similar? At least for Python 2/3 code? Sounds something like the py.exe launcher on Windows. So I guess what you're asking is: should the 'python' binary on other platforms do the same kind of checks? The answer to that probably should take into account virtual environments, but it would be convenient for some specific circumstances. I wouldn't recommend depending on it, though, if for no reason than that you can't guarantee that 2.7.13+ is installed on everyone's systems. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Can Python learn from Perl? Perl 5 can now run Perl 6 code Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-07-28 17:21 +1000
Re: Can Python learn from Perl? Perl 5 can now run Perl 6 code Lutz Horn <lutz.horn@posteo.de> - 2016-07-28 09:33 +0200
Re: Can Python learn from Perl? Perl 5 can now run Perl 6 code Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-07-28 10:59 +0300
Re: Can Python learn from Perl? Perl 5 can now run Perl 6 code Chris Angelico <rosuav@gmail.com> - 2016-07-28 17:48 +1000
Re: Can Python learn from Perl? Perl 5 can now run Perl 6 code Random832 <random832@fastmail.com> - 2016-07-28 09:53 -0400
Re: Can Python learn from Perl? Perl 5 can now run Perl 6 code Chris Angelico <rosuav@gmail.com> - 2016-07-29 00:40 +1000
csiph-web