Why is Perl losing ground?

D

Dominic

As a programmer who is addicted to Perl, I am curious as to why Perl is
losing ground to another bunch of languages, namely: Python, PHP and
Ruby. I'd like to hear your opinions. Is Perl just not "trendy" anymore?
Does it still scare programmers who haven't used it? Or do the other
languages have any major advantages over Perl? I haven't worked in these
other languages, so I'm not qualified to have much of an opinion here.
What do you think?

- Dom
 
K

Kirk Strauser

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 2004-02-09T15:54:40Z said:
As a programmer who is addicted to Perl, I am curious as to why Perl is
losing ground to another bunch of languages [...]

Is it? It may not be getting the same buzz, but I haven't seen it
declining.
namely: Python

I have to admit that I really, really like Python, and I've started using it
in places where I would've previously used Perl. It's a very personal
decision, though; Python is usually a closer match to the way *I* model
systems than Perl, but that's clearly not true for everyone.

Oh, Lord. I can't stand PHP. It seems like someone wanted "Perl Lite" for
web scripting, and when it caught on and people started demanding more
functionality, they just started randomly adding portions of almost-Perl
until it compiled without too many warnings. I can't think of one single
reason why anyone would use PHP over Perl, other than "my free web host made
it available", which is just a made decision made cyclic.
- --
Kirk Strauser
The Strauser Group
Open. Solutions. Simple.
http://www.strausergroup.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAJ7dI5sRg+Y0CpvERAkIRAJ9BTJVCHAovKx/PyxMtwO40EWvKOQCeOpbN
5TsZzStJjFWS7iLfAogRTTg=
=h8BP
-----END PGP SIGNATURE-----
 
B

Ben Morrow

Kirk Strauser said:
As a programmer who is addicted to Perl, I am curious as to why Perl is
losing ground to another bunch of languages [...]

Is it? It may not be getting the same buzz, but I haven't seen it
declining.

Well, given that Once Upon A Time Perl was the only thing between
shell and C, it's not surprising that it's giving a bit. I don't think
the Perl community has suffered in any material way from Python et
al., though: rather the opposite.
Oh, Lord. I can't stand PHP. It seems like someone wanted "Perl Lite" for
web scripting, and when it caught on and people started demanding more
functionality, they just started randomly adding portions of almost-Perl
until it compiled without too many warnings. I can't think of one single
reason why anyone would use PHP over Perl, other than "my free web host made
it available", which is just a made decision made cyclic.

PHP is great for what it was designed for: a simple way to put a small
amount of scripting into a basically static HTML page. It's been
stretched *waay* beyond that now, though, and needs the same sort of
major rewrite/rethink that happened perl4->perl5. (FWIW I have heard
from friends who actually use the language :) that the PHP folks are
doing something along these lines now).

Ben
 
K

Kirk Strauser

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 2004-02-09T17:07:32Z said:
PHP is great for what it was designed for: a simple way to put a small
amount of scripting into a basically static HTML page.

Having used both, though, I honestly don't see what's easier or simpler
about PHP's syntax. It comes with syntax for embedding logic inside
presentation, granted, but any number of Perl modules do the same thing.

What I *have* noticed is that it tends to have many partially overlapping
functions that seem to differ mainly by whether you want to print the output
automatically, return it for further processing, or both - and distinguished
- From each other largely by putting the arguments in a random order. It's
very typical to see:

foo_do(bar, baz, qux)
foo_execute(baz, qux)
foo_exec(qux, bar, baz)
foo_dothis(bar)

Yet, somehow, people seem to think PHP is easier. I just don't understand.
- --
Kirk Strauser
The Strauser Group
Open. Solutions. Simple.
http://www.strausergroup.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAJ8LN5sRg+Y0CpvERAuhCAJ9RUqUIFTGrmt678oed0wz2AGH3jACfYFk8
/CTBFmO147EFBomYIxgjtxU=
=7G4S
-----END PGP SIGNATURE-----
 
P

Peter Hickman

Dominic said:
As a programmer who is addicted to Perl, I am curious as to why Perl is
losing ground to another bunch of languages,

Is it? Where did you get this idea from?
Is Perl just not "trendy" anymore?

Thats correct, it is no longer trendy and hasn't been for years. Thats a
good thing by the way, Perl is now a standard tool in the programmer's
toolbox and not a passing fad. CASE anyone?
Does it still scare programmers who haven't used it?

Again where did you get this idea, some facts would be nice.

An important point that you are missing is that a lot of programmers who
code in Perl are just that programmers who happen to code in Perl. They
also code in a variety of languages (I use Ruby, Python and Tcl/Tk - I
must get round to using Eiffel). A programming language is not a
religion, except for the stupid, and a good programmer will learn and
use other languages just for the hell of it.

Thus the ranks of the Python and Ruby programmers are being swelled by
Perl programmers. Very few programmers who use Perl are abstaining from
Perl altogether. Sure there are some /religious/ types that use Java and
swear off Perl as the spawn of satan but these people are nutters just
like the people who swear that Perl is the one and only language.

Imagine a carpenter who only used a mallet - not much of a carpenter?
Why then should a programmer use only one language?
 
W

Walter Roberson

:As a programmer who is addicted to Perl, I am curious as to why Perl is
:losing ground to another bunch of languages

:Does it still scare programmers who haven't used it?

It still scares programmers who *have* used it ;-)
 
A

Andy Baxter

Kirk Strauser said:

Oh, Lord. I can't stand PHP. It seems like someone wanted "Perl Lite" for
web scripting, and when it caught on and people started demanding more
functionality, they just started randomly adding portions of almost-Perl
until it compiled without too many warnings. I can't think of one single
reason why anyone would use PHP over Perl, other than "my free web host made
it available", which is just a made decision made cyclic.

I had a quick look at some PHP code a month or so ago, and some things
about it seemed quite nice, like the way cgi variables are automatically
turned into local variables in the script. Apart from that, I don't know,
as I've not tried coding in it. I'm not sure that mixing code and content
is the best way anyhow - the HTML::Template approach where the two are
kept seperate is more to my taste. And having started writing my web app
like this, it means someone with few coding skills could easily translate
the whole site into another language, or change the layour or whatever,
which is a bonus to this way of doing it.
 
M

Malcolm Dew-Jones

Kirk Strauser ([email protected]) wrote:
: =2D----BEGIN PGP SIGNED MESSAGE-----
: Hash: SHA1


: > PHP is great for what it was designed for: a simple way to put a small
: > amount of scripting into a basically static HTML page.

: Having used both, though, I honestly don't see what's easier or simpler
: about PHP's syntax. It comes with syntax for embedding logic inside
: presentation, granted, but any number of Perl modules do the same thing.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

That's at least half the problem. Unlike Java (JSP) or ASP (and what ever
language it uses) or PHP, perl has no _standard_ way to create web pages
in this sort of manner.

Making decisions is a large part of any project.

Working with PHP includes fewer decisions, therefore many people will find
it easier to use.

You see this in other situations. What is easier? Digging a ditch or
planning the drainage in the first place. Digging the ditch is more grunt
work (i.e. PHP) but it's obvious what to do and therefore it's easy for
anyone to do the work. On the other hand, planning the drainage requires
much less labour (i.e. Perl), but ultimately it's a harder job for many
people because it involves making non-obvious decisions.
 
K

Kirk Strauser

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 2004-02-09T19:22:28Z said:
I had a quick look at some PHP code a month or so ago, and some things
about it seemed quite nice, like the way cgi variables are automatically
turned into local variables in the script.

Note that this was considered a horrible security bug to the point that it's
no longer the default action.

For example, imagine this code snippet in a little-used auxiliary directory
in a widely-used bulletin board system:

$sql = 'select * from foo'
$result = mysql_query($sgl)

In other words, the author made a typo when he wrote "$sgl" on the second
line. A malicious party realizes the mistake and visits the page with the
query string "?sgl=select * from usertable". His new "$sgl" variable is
injected into the global namespace of the running script and the
mysql_query() function executes his code instead of the intended line.

Convenient, sure, but one of the more bone-headed language misfeatures I've
seen.
- --
Kirk Strauser
The Strauser Group
Open. Solutions. Simple.
http://www.strausergroup.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAJ+Jy5sRg+Y0CpvERAl5qAKCVhylGyhLNacGoPY7x1y/rvYtbDgCglIDi
iVh7MshDl6zFn3LXWsw+dLw=
=8Sa9
-----END PGP SIGNATURE-----
 
D

David K. Wall

Kirk Strauser said:
At 2004-02-09T19:22:28Z, Andy Baxter
I had a quick look at some PHP code a month or so ago, and some things
about it seemed quite nice, like the way cgi variables are
automatically turned into local variables in the script.

Note that this was considered a horrible security bug to the point that
it's no longer the default action. [snip]

Convenient, sure, but one of the more bone-headed language misfeatures
I've seen.

The SAS system (sas.com) does something similar. Someone in my first
training class for SAS web programming used a macro variable that was the
same as one of the form parameters. Instant bug and unexpected results.
Even the instructor was puzzled, at least for a few hours.

If you're offered a job using SAS to do web stuff for anything more
complicated than a few predefined queries, run away screaming.

(Side note: I took another SAS "web" class where the instructor
consistently referred to CSS as "cascading spread sheets". By the end of
the class I wanted to strangle her. (that wasn't the /only/ reason))
 
D

David Dyer-Bennet

Dominic said:
As a programmer who is addicted to Perl, I am curious as to why Perl
is losing ground to another bunch of languages, namely: Python, PHP
and Ruby. I'd like to hear your opinions. Is Perl just not "trendy"
anymore? Does it still scare programmers who haven't used it? Or do
the other languages have any major advantages over Perl? I haven't
worked in these other languages, so I'm not qualified to have much of
an opinion here. What do you think?

PHP out-performs Perl by a tremendous margin in a shared hosting
environment, which is where most sites are implemented. mod_perl
doesn't isolate the various users enough to be very safe in a shared
hosting environment, and you need mod_perl to get performance.
 
L

lesley.b

Kirk Strauser ([email protected]) wrote:
: =2D----BEGIN PGP SIGNED MESSAGE-----
: Hash: SHA1


: > PHP is great for what it was designed for: a simple way to put a small
: > amount of scripting into a basically static HTML page.

: Having used both, though, I honestly don't see what's easier or simpler
: about PHP's syntax. It comes with syntax for embedding logic inside
: presentation, granted, but any number of Perl modules do the same thing.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

That's at least half the problem. Unlike Java (JSP) or ASP (and what ever
language it uses) or PHP, perl has no _standard_ way to create web pages
in this sort of manner.

Making decisions is a large part of any project.

Working with PHP includes fewer decisions, therefore many people will find
it easier to use.

You see this in other situations. What is easier? Digging a ditch or
planning the drainage in the first place. Digging the ditch is more grunt
work (i.e. PHP) but it's obvious what to do and therefore it's easy for
anyone to do the work. On the other hand, planning the drainage requires
much less labour (i.e. Perl), but ultimately it's a harder job for many
people because it involves making non-obvious decisions.


Best argument I have heard yet.

I am not 'up' on PHP at all but I've just bought a book on PHP and web
development and delved into parts of the first chapter.

To me, PHP looks like a scripting version of Perl in the same way ASP
is a scripting version of VB. This is obvioulsy a huge generalisation
and I'll freely admit, would probably hold less water than a colander
if put seriously to the test.

Lesley
 
B

Ben Morrow

To me, PHP looks like a scripting version of Perl in the same way ASP
is a scripting version of VB.

Err... no. Perl is the scripting version of Perl. PHP is in no way
related, and some of the language concepts are quite different (no
distinction between arrays/hashes, no closures, no refs, no
namespacing, no anything that makes Perl what is is... :).

About the only similarites are that both have a 'scalar' variable type
This is obvioulsy a huge generalisation and I'll freely admit, would
probably hold less water than a colander if put seriously to the
test.

Yup!

Ben
 
R

Robert

David Dyer-Bennet wrote:
PHP out-performs Perl by a tremendous margin in a shared hosting
environment, which is where most sites are implemented. mod_perl
doesn't isolate the various users enough to be very safe in a shared
hosting environment, and you need mod_perl to get performance.

mod_php out-performs mod_perl? Really? Show me the tests...
 
B

Ben Morrow

Robert said:
David Dyer-Bennet wrote:


mod_php out-performs mod_perl? Really? Show me the tests...

No, he said mod_php outperforms CGI Perl (duh) and that he doesn't
trust mod_perl.

Ben
 
T

Tore Aursand

PHP out-performs Perl by a tremendous margin in a shared hosting
environment, which is where most sites are implemented. mod_perl
doesn't isolate the various users enough to be very safe in a shared
hosting environment, and you need mod_perl to get performance.

Well. What you _actually_ is trying to say, is that:

a) mod_php is faster than CGI
b) You don't trust mod_perl

Now. Do _you_ see how smart your statement was? :)


--
Tore Aursand <[email protected]>
"Scientists are complaining that the new "Dinosaur" movie shows
dinosaurs with lemurs, who didn't evolve for another million years.
They're afraid the movie will give kids a mistaken impression. What
about the fact that the dinosaurs are singing and dancing?" -- Jay
Leno
 
D

David Dyer-Bennet

Robert said:
David Dyer-Bennet wrote:


mod_php out-performs mod_perl? Really? Show me the tests...

mod_php is usable in a shard hosting environment. mod_perl
essentially is not; at least that seems to be the consensus of most of
the places selling shared hosting, and reading about it, it does seem
that you don't have adequate isolation between virtual users in
mod_perl.
 
D

David Dyer-Bennet

Ben Morrow said:
No, he said mod_php outperforms CGI Perl (duh) and that he doesn't
trust mod_perl.

Well, mostly. I trust mod_perl just fine, so long as I'm the only
user.
 
P

Peter Hickman

Tore said:
Well. What you _actually_ is trying to say, is that:

a) mod_php is faster than CGI

No he did not. Read it again and look for the string CGI. It's not there
is it - you made that bit up.
b) You don't trust mod_perl

Again read what he has said, the 'in a shared hosting environment' is a
caveat on the use of mod_perl. Not a declaration that he does not trust
mod_perl.
Now. Do _you_ see how smart your statement was? :)

How about yours?
 
B

Ben Morrow

Peter Hickman said:
No he did not. Read it again and look for the string CGI. It's not there
is it - you made that bit up.


Again read what he has said, the 'in a shared hosting environment' is a
caveat on the use of mod_perl. Not a declaration that he does not trust
mod_perl.


How about yours?

'PHP out-performs Perl ... in a shared hosting environment'

We are only talking about shared hosting.

'you need mod_perl to get performance'

Hence, since he hasn't 'got performance', he is using CGI perl.

Try applying a small amount of logic when reading: it tends to help.

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top