Re: [ILUG] When to use Perl

From: Pat Martin (sheryle at domain mediaone.net)
Date: Wed 01 Aug 2001 - 04:54:50 IST


Yes, Perl has made great strides in it's inoperability with C. I remember
the pain incurred from integrating C routines into Perl and with Perl 5,
Perl into C. It's a walk in the park now.

While we're on the topic of plugging web languages, I must say that
Ruby looks quite fascinating to me.

- Pat

----- Original Message -----
From: "Fergal Daly" <fergal at domain esatclear.ie>
To: "Harry Moreau" <hmoreau at domain digiserve.ie>
Cc: <ilug at domain linux.ie>
Sent: Tuesday, July 31, 2001 10:37 AM
Subject: Re: [ILUG] When to use Perl

> On Tue, Jul 31, 2001 at 01:29:01PM +0100, Harry Moreau wrote:
> > Definitely not with C/C++. While fast, it's just too difficult to parse
> > text in a bug free manner.
> >
> > As an alternative to perl, you might consider tcl or python, which are
IMO
> > much easier to learn than perl.
> >
> > Both have much more regular syntax than perl and are either
intrinsically
> > or extensionally object oriented; python intrinsically and tcl with the
> > [incr tcl] extension. Furthermore both python and tcl are very easy to
> > extend with new functionality implemented in C/C++, because they were
> > designed to be embedded languages.
>
> Just in case anyone was beginning to doubt it, Perl also has an incredibly
> flexible object system as a core feature of the language. This includes
> dynamic method creation/dispatch, dynamic class creation and even
> "multi-method" dispatch - where you select the correct method based on the
> class of more than 1 of the objects involved.
>
> While I'm at it, Perl is not only embeddable and extensible but it has the
> exteremly funky Inline module which lets you include bits of C in your
Perl
> programs and call them as if they were just perl functions.
>
> use Inline C => << 'END_OF_C';
>
> void japh(char *x) {
> printf("Just another %s hacker\n", x);
> }
> END_OF_C
>
> foreach my $lan (qw( Perl C))
> {
> japh($lang);
> }
>
>
> The C will be dynamically recompiled only if you haven't changed the C
code
> since the last time. It's not just a gimmick, you can access shared
> libraries and the whole shooting gallery with this. See
>
> http://search.cpan.org/doc/INGY/Inline-0.43/C/C-Cookbook.pod
>
> for a bunch of examples.
>
> People often talk about coding in high level languages but doing the high
> performance bit in C or assembler. It's not going to get any easier than
> this!
>
> Fergal
>
> --
> Irish Linux Users' Group: ilug at domain linux.ie
> http://www.linux.ie/mailman/listinfo/ilug for (un)subscription
information.
> List maintainer: listmaster at domain linux.ie



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:11:24 GMT