Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^3: The Slashdot Interview With Larry Wall

by salva (Canon)
on Jul 21, 2016 at 09:32 UTC ( [id://1168217] : note . print w/replies, xml ) Need Help??

in reply to Re^2: The Slashdot Interview With Larry Wall
in thread The Slashdot Interview With Larry Wall

it is technically one of the better non-blocking highly parallel solutions

That is far from being true!

Perl as a language is very bad suited for that task as it lacks the high level features required to do that comfortably, i.e. coroutines (aka cheap threads), continuations, generators or even some minimal syntactic sugar. Also, the lack of a proper garbage collector and the callback-programming style commonly used by non-blocking frameworks is a bad combination, prone to produce reference cycles and so, memory leaks. The programmer needs to take care of that explicitly (for instance, using curry::weak).

Programming using callbacks is horrific, it is not for nothing that people have coined the term "Callback Hell"! It requires discipline and structuring the code artificially. Also, code (or modules) not designed for being used asynchronously can not be used freely without workarounds (for instance, forking).

That Perl frameworks so good as Mojolicious exists, is not because of Perl being a suitable language for that. It is because the authors are really geniuses that have been able to overcome its limitations an provide a foundation that the rest of us can use easyly and even enjoy doing it!

Hopefully, asynchronicity and the high level features cited above are available (or planed) in Perl 6 so that would be a complete different history!

  • Comment on Re^3: The Slashdot Interview With Larry Wall