Re: [Nolug] language of choice?

From: Jimmy Hess <mysidia_at_gmail.com>
Date: Thu, 22 Aug 2013 19:53:49 -0500
Message-ID: <CAAAwwbXBqn4wEM6_ZAc-kHtR=+ckXnw5dOOLU6VkpwN2Az7Grw@mail.gmail.com>

On Thu, Aug 22, 2013 at 7:36 AM, Jerry Wilborn <jerrywilborn@gmail.com>wrote:

> Throwing down the gauntlet(!): I believe I could port any Perl parsing
> script to PHP that would best it in simplicity and speed. One (slightly
> off topic) example is I've ported https://code.google.com/p/snmp-session/to PHP and the speed was significantly increased (doubled) on similar
> hardware.
>

When we are talking about scripting languages; PHP and Perl are close
enough, that speed is mainly about design choices.

You know...I'm certain I could port any badly written horribly inefficient
algorithm implemented in PHP script to Perl and improve its simplicity and
speed, by fixing the brokenness in the port.

I'm certain I could port any badly written horribly inefficient Perl
parsing script in PHP and improve its simplicity and speed too, by fixing
the brokenness in the port.

But PHP is not designed for that task, and is ill-suited for it;
it would make more sense to fix the Perl script or rewrite it in Perl,
 than to shoehorn PHP into the role of batch-processing script.

When we are talking about well-designed Perl scripts; there is really no
significant performance advantage from rewriting it in PHP.

There are a number of cases, where Perl provides a phenomenal advantage,
however, over time PHP itself will improve.

Therefore, the choice of PHP or Perl is not about "speed".

Ease of maintenance, and quickly availability of APIs and frameworks for
rapid development are crucial.

PHP has nothing that compares to what I can get from CPAN; when we are
talking about rapid application development ---- making the code in PHP
involves lots of bug-prone wheel-reinvention,

and time wasted building things that should be available from a framework
or Library; in the case of Perl they are, and in the case of PHP, they
are not.

> That said, I'm reminded of the phrase "when your only tool is a hammer,
> everything looks like a nail." I think all of the languages have their
> advantages; PHP just seems to have so many more. ;)
>

> Jerry Wilborn
> jerrywilborn@gmail.com
>

 --
-JH

___________________
Nolug mailing list
nolug@nolug.org
Received on 08/22/13

This archive was generated by hypermail 2.2.0 : 09/04/13 EDT