in reply to Re^2: Slow evolution of Perl = Perl is a closed Word (NQP, parrot concurrency == Oh dear.)
in thread Slow evolution of Perl = Perl is a closed Word
If you're looking for the problems of tacking on threads afterwards, you can also take a look at the Python Global Interpreter Lock (and the discussion around it). While I'm not a fan of Guido van Rossum's striving for speed for speeds sake, the discussion highlights the problems that you encounter when you don't plan for share-everything threading/lightweight threading/fibers/coroutines from the start.
Of course, there remain the semantical problems of the global name space of Perl, especially what happens in a share-everything model with the following code:
sub quote_string { qq{"\Q$_[0]\E"} }; sub send_to_client { my $client_socket = shift; async { print {$client_socket} quote_string($_) for @_; }; }; function send_strings_to_client { local *quote_string = sub { qq{'\Q$_[0]\E'} }; send_to_client(@_); };
With a share-everything, it's not really clear how overwriting the globs should be handled. I would be for "overwriting (code) glob entries is discouraged" and there should/could be a strict 'thread-globs' pragma that prevents you from assigning to glob entries. This should prevent 95% of all those problems.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Slow evolution of Perl = Perl is a closed Word (NQP, parrot concurrency == Oh dear.)
by BrowserUk (Patriarch) on Sep 14, 2007 at 01:22 UTC |