http://www.perlmonks.org?node_id=776759


in reply to disadvantages of perl

I'm nobody, but hey, I'll give it a shot.

The C API is a mess. Ok, say you identified the few bottlenecks of your code with great profilers like NYTProf, now you think "i'll write that in C". Except, see, you'd need to be a freakin genious to get that right. The Perl C API should have an explicit motto like "Not for mere mortals" or "Abandon all hope ye who enter here". Or something. To program non-trivial stuff with its C API, you *have* to know all the implementation details of Perl. You know, all the stuff grown into it since 1994. Or something.

Speed. We lose each day on the speed front. It's not the late 90s anymore. :(

Multiple cores. perl copies waaay too much data around. Can not be told to do otherwise. Readonly is not readonly. Fork COW ? Exploding RAM. Given the rise of multiple cores this is... unfortunate.


Syntax. I need to repeat myself way too much. use warnings, strict, feature, shift, ref... think for example, params validation, say, is_non_empty_hashref,


# WTF if ( defined $r && ref $r && ref $r eq 'HASH' && keys %$r ) { ... }

Sigils are OK. IMHO, their only problem is that deep structures can become syntax horrors. I think explicit aliasing in the core could reduce this one.


Exposed internals. I know about the guts. I'd like to not care. KTHX.
# XXX PerlIO: Wide character... binmode $socket, utf8::is_utf8( $data ) ? ':utf8', ':raw';
Context gotchas! Quick, tell me the difference between lists and arrays. You think you wouldn't need to know ? wantarray() ? Oh...

Let me try to sum things up. Yes, i'd love the language to have macros, a speed{y,ier} VM, a clean and well-documented API, powerful function signatures, a bit-more-than-minimal OO, immutability, cached compilations (ie. working bytecode), assertions, inline expansions. Type hinting, for speed, would be the sugar on top. What did i miss ? Ah, *way-too-many-ways-to-do-stuff* !! :) I'd like the Core to HLP ME THRE PLIZ.

Yes, i know about the Promised Land. Oh, the Dream... Except, you know, Perl 6 is/will be *another* language. :)
I love Perl 5. It gets many things more than right. I like the people. I like the culture. Did i say i love perl ? And after it drives me nuts, i love it more, because that usually means i find "better" ways to do the stuff i was doing. And then i hate it again. And then... yes, sorry, it's a nice day here at the Asylum...


Update: del bad, pathological code, for spawning responses undermining the point :)

-- 
perl -MLWP::Simple -e'print$_[rand(split(q|%%\n|, get(q=http://cpan.org/misc/japh=)))]'