in reply to Perl: friend or foe ?

In addition to all of the above, there are several ways (XS, Inline::C, swig) to enable Perl code to call, e.g., compiled C code. A common technique is to structure the program so that the computationally demanding parts can be written in C (for example); the entire program then consists of a Perl "wrapper"1 and one or more native subroutines to take care of the heavy lifting. A lot of modules in CPAN use this approach.

1The term "wrapper" here is a bit misleading, because this Perl code often does substantive work other than just calling the native subroutines.

the lowliest monk

Replies are listed 'Best First'.
Re: Perl: friend or foe ?
by MonkPaul (Friar) on Apr 24, 2005 at 14:06 UTC
    Precisly,

    Having to call up the heavy duty C code highlights the point of my question. The perl code is not quick or 'strong' enough to cope with the heavy duty tasks. WHY?

    Im not sure if im jumping out on a limb, but, with Java, it easy to write the code, test, re-write, re-test, and release. The one disadvantage is that after re-writing it has to be compiled again, BUT, its quicker in the long run if a big application was running.

    Feel free to spank me on this but, doesn't perl only cope with some much smaller tasks, i.e. something that does not demand a high level amount of processing. If this is so, WHY?

    MonkPaul

        From what I've heard, Amazon is not pure Perl. While they use a lot of Perl, they use a lot of other stuff as well (eg Java).

        I've also heard that Ticketmaster is currently planning to move from Perl to an optimized C architecture. (We'll see if that actually happens though..)

        I have heard no recent rumors from IMDB, so I don't know their status.

        Good stuff,

        BUT, is perl used for such tasks as instrument interaction (lab equipment, or printer control), or some stand-alone package like a word processor or photo editor.

        I understand the above reply, but to me it seems as if they are web applications. Does this wide use still apply to desktop applications?

        My other question would be, why progress in creating a language has not turned to utilising the best from all other languages, like SQL database queries, C++ and Java object orientation, Perl text and mudule interaction etc. etc.

        Im still interested in other peolpes view so keep them coming.