Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, Perl 6 created a lot of confusion especially inside the Perl 5 community. But, in the end, they figured it all out: Perl 5 lives on and Perl 6 got out of its way by renaming itself to Raku. And, for the record: Raku itself is a gem of a language, I believe. A pretty solid OO system, optional typing, powerful language constructs, stellar Unicode support and somehow it is still staying true to Perl's rather pragmatic and, if I may say so, libertarian approach to software developing. I personally love raku's "grammars" most because they render writing parsers a routine job, it's amazing and no other programming language provides such a feature.

If you're interested I strongly suggest you to check out Brian D Foy's book on Raku: https://www.oreilly.com/library/view/learning-perl-6/9781491....



How about the reported Perl6 / Raku speed issues? Saying "reported" because I have not done an in-depth study if they exist, just read about it briefly somewhere (and a while ago, may a year or so). If they did/do exist, was/is anything being done about them? Asking because I, for one, found both Perl 5 and 6 interesting, and the language features of both, somewhat unusual and powerful.


Raku is a significantly higher level language than most languages. Which tends to lead to slowness.

Really it's faster in many places than it has any right to.

    @a[1];
Is just shorthand for a subroutine call.

    postcircumfix:< [ ] >( @a, 1 );
Which ends up calling a method.

    @a.AT-POS( 1 );
Actually that is also a simplification as AT-POS is probably a multi method. Not to mention inheritance.

There is even a level under that, NQP. (simplified example below)

    my $reified := nqp::getattr(@a, List, '$!reified');
    my $result  := nqp::atpos($reified, $pos);
All of those levels of indirection have a cost associated with them.

---

It just Rakudo on MoarVM has a bunch of optimizations to remove the needed complexity at some point. Either during compilation, or after it's been running for a while.

So with those optimizations it can sometimes beat other higher level languages. (For some specific uses it may even sometimes meet or exceed the speed of low level languages like C/C++. Mainly for algorithmic reasons.)

More optimizations would always be nice though.


Interesting. Thanks for the reply. Just saw it now. I get it.


I think Raku is still quite a bit slower. But I am not up-to-date with the latest state. However, this is "just" a matter of optimization of the interpreter over time. It's just that Perl 5's interpreter had a head start of more than 25 years.


Yes, that is possible. Java was dead slow early on (I first used it soon after it came out, and pioneered use of servlets in my company at the time), but after Sun's management threw millions of dollars and high-end tech people at the problem, it got fast enough for many uses in a few years, what with the Hotspot VM and JIT tech and so on.


Sorry, the millions of dollars was mostly for marketing (which is largely what led to its huge adoption), but at least some of that money would have been used to hire top people like computer science compiler specialist PhDs to work on making it faster. I had read about that at around that time.


Raku outperforms perl5 and cpython on quite a few benchmarks, and has for a couple of years now. Some of the ‘nice’ features have pathological performance, but if it becomes a problem in practice you have recourse.


Hope so. Want to try it out. I bought and read most of the llama and camel books years ago, at Perl v4 or so. Ditto for the Perl Cookbook. (All 3 by O'Reilly. Some of those Cookbooks were very good. Also had the Python and Java Cookbooks.)

Enjoyed them (the Perl books). But didn't get a chance to use Perl in non-trivial real projects.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: