in reply to disadvantages of perl
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';
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=)))]'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: disadvantages of perl
by ikegami (Patriarch) on Jul 02, 2009 at 15:25 UTC | |
Re^2: disadvantages of perl
by JavaFan (Canon) on Jul 02, 2009 at 15:22 UTC | |
Re^2: disadvantages of perl
by Anonymous Monk on Jul 02, 2009 at 14:34 UTC | |
by ikegami (Patriarch) on Jul 02, 2009 at 15:52 UTC | |
by Anonymous Monk on Jul 02, 2009 at 14:36 UTC | |
by chromatic (Archbishop) on Jul 02, 2009 at 23:08 UTC |