Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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=)))]'

In reply to Re: disadvantages of perl by zgrim
in thread disadvantages of perl by perldesire

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 21:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found