Perl 6 was supposed to be an upgrade but it kept changing. I lost interest and know I will never use it. And if it is a totally different language why is it called Perl?
The same guy (Larry Wall) who originally wrote Perl 1 to 5.6 is the one who is writing the spec (though not the implementations) for Perl 6. People let him do it out of respect, even though it's disastrous for Perl 5.
I've seen quite a few people describe Python 3 as a new language relative to Python 2. Having used both now, I don't agree at all, but I have no experience whatsoever with Perl so I'm not in the same position to compare the different versions of it.
Are there really more differences than things they share in common, to the extent that "new language" is an accurate description?
I think it is correct to view them as related, but definitely not the same language.
A short example from the recent Perl6 calendar[1]:
Perl5:
package Timer;
use Time::HiRes qw(gettimeofday tv_interval);
use Mojo::Base -base;
use experimental 'signatures', 'postderef';
has _event_log => sub { [] };
has _start_time => sub { [ gettimeofday ] };
sub record ($self, $event_description) {
# record the event and timestamp
my $event = {
timestamp => sprintf('%.3f', tv_interval($self->_start_time)),
description => $event_description,
};
push($self->_event_log->@*, $event);
}
sub report ($self) {
# render a full report
my $report = '';
foreach my $event ($self->_event_log->@*) {
$report .= sprintf "[%s] %s\n", $event->{timestamp}, $event->{description};
}
return $report;
}
1;
Perl6:
class Timer {
has $!start-time;
has @!event-log;
method record ($event_description) {
# initialise the start-time if this is the first time through
$!start-time //= now;
@!event-log.push({
timestamp => now - $!start-time,
description => $event_description
});
}
method report {
my @report_lines;
for @!event-log -> %event {
@report_lines.push("[%event<timestamp>.fmt("%.3f")] %event<description>");
}
return @report_lines.join("\n");
}
}