"Perl 6 match objects"? OK, not that I think Perl6 actually matters, but still ... having experience with the insanely overcomplicated Match/Matches/etc./etc./etc./etc. objects of the .Net regular expressions ... this sounds scary. So I asked uncle Google, ended up in per6-regex-intro and ... I did not like what I saw. OK. So the matches are in the object named $/ (OK, so $/ meant something in Perl5, let's change that!) and you can access them as $/, $/, ... (hey, wasn't we supposed to use @ for arrays. Oh, right, this is an object, you just index it as if it was an array, but ...) ... and there are shortcuts in the form $0, $1, $2, ...
WHAT?!? Yeah, the sortcuts start with $0! Yeah, what used to be $1 is now $0, what used to be $2 is now $1 etc. Just lovely! Imagine you got yourself into the situation when you have to write Perl6 code while still maintaining Perl5 code. I'd love to have a penny for every full hour lost because of the confusion caused by this change! Even with the number of people using Perl6 now, I'm sure it'd pay a few beers.
The more I know about Perl6, the more I hope it's gonna disappear almost without a trace as a failed experiment. It uses the name, it looks deceptively similar, yet it is full of changes carefuly designed to cause as much confusion as possible.
Enoch was right!
Enjoy the last years of Rome.
Re: Perl 6 <-> Perl 5 bridges (was Re^2: Capturing parenthesis and grouping square brackets)
Replies are listed 'Best First'.
|Re^2: Perl 6 <-> Perl 5 bridges (was Re^2: Capturing parenthesis and grouping square brackets)|
by raiph (Hermit) on Jun 21, 2013 at 08:32 UTC
by Jenda (Abbot) on Jun 21, 2013 at 08:57 UTC
by raiph (Hermit) on Jun 21, 2013 at 11:50 UTC
by raiph (Hermit) on Jun 28, 2013 at 02:23 UTC
by Jenda (Abbot) on Jun 28, 2013 at 10:16 UTC
by raiph (Hermit) on Jun 28, 2013 at 18:27 UTC
by raiph (Hermit) on Jun 28, 2013 at 18:38 UTC