Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I think Perl loses a lot of its advantage when you a start writing large chunks of code with it.

From my experience, length has nothing to do with things, for the most part -- any large chunk of code is just an assemblage of small chunks of code. Of course, because you can do so much with so little, some people may try to use techniques that they would use for throw away scripts for larger programs.

Larger programs take a different mindset on the programmer's part -- making sure that you choose effective variable, subroutine and package names; adequate comments and documentation; etc. I don't think the language plays as much as a factor as the programmer in these sorts of situations.

From my experience, the main issues that I have with Perl are when assumptions are made, that you may need to supress -- like autovivication, or that a scalar can hold a number, string or reference, or that the first argument to print may be a filehandle.indirect object syntax with print

I've never found that I couldn't work around any of the problems that I've had, but there are times when you're writing something, and things don't behave as you expected (this tends to happen more with non-core modules -- I've lost way too much time redoing large chunks of the serializer in SOAP::Lite so that it behaves how I prefer it to work.)

In times like this, I have yet to find that I couldn't work around the issues, but it can be a time suck, as you sift through documentation, websites, the code, etc. -- this is the time when I find I lose any advantages.

A few times, I've had to change my logic to more closely mesh with the modules that I'm using, or otherwise rewrite large chunks of it, but I've never had to give up and move to a completely different language. (well, for some web-based stuff, I'll use JavaScript, too, or use PL/SQL for Oracle stored procedures, but that's been because of how I thought about the problem, not because I tried to do it in Perl, and failed).

Update: I realized I probably shouldn't have singled out SOAP::Lite in the above example, as the reason I had to rework the serializer was to get it to work with a Java toolkit... so in a way, it was actually Java's fault that the Perl wasn't working.

Update: revdiablo reminded me that technically, print doesn't take a filehandle as an arg -- it's a different calling syntax. So I'll complain about indirect object syntax in general.


In reply to Re^2: TMTOWTDI... and most of them are wrong by jhourcle
in thread TMTOWTDI... and most of them are wrong by tlm

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 having a coffee break in the Monastery: (8)
As of 2024-04-19 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found