perl and php

P

peter

Hi,

this is not stinky bait. If you take it that way, please dont respond..

I have been away from UNIX software for quite awhile and want to get
back into it. I liked "C" but Java seems like the way to go for
compiled langs, now days so I will learn that.

At one time, I did a bit of perl but now I see php alot. I was
wondering what you guys thinks of the pros/cons of perl and php.

I appreciate your time,
peter
 
Q

QoS

peter said:
Hi,

this is not stinky bait. If you take it that way, please dont respond..

I have been away from UNIX software for quite awhile and want to get
back into it. I liked "C" but Java seems like the way to go for
compiled langs, now days so I will learn that.

At one time, I did a bit of perl but now I see php alot. I was
wondering what you guys thinks of the pros/cons of perl and php.

I appreciate your time,
peter

IMO PHP is kinda like a watered down Perl without CPAN.

BTW Java is not a fully compiled language, it just gets slightly
optimized then is compiled fully at runtime.

Check these and decide for yourself:

http://en.wikipedia.org/wiki/Comparison_of_programming_languages

http://99-bottles-of-beer.net/
 
C

Charlton Wilbur

p> At one time, I did a bit of perl but now I see php alot. I was
p> wondering what you guys thinks of the pros/cons of perl and
p> php.

PHP is optimized for beginners and for web work, and tends to cause
suffering when you try to take it out of those areas. You'll probably
get more basic web stuff done more quickly if you use PHP, but it
won't serve you well in the long run, especially if your program grows
to the point where it has more than one person working on it or
extends tentacles into non-web areas.

You'll probably get exactly the opposite answer if you ask in a PHP group.

Charlton
 
P

peter

Charlton said:
.

You'll probably get exactly the opposite answer if you ask in a PHP group.

:) that was pretty much the case. Being from a UNIX background, it
looks like perl is gooder for me.

maybe more comments will come later.

thanks,
peter
btw do abigale (sp?) and larry still contribute? (that is how long ago
i did perl)
 
N

noident

I have been away from UNIX software for quite awhile and want to get
back into it. I liked "C" but Java seems like the way to go for
compiled langs, now days so I will learn that.

There is also C++, which seems to be in use, but yes, Java is the
flavour of the day these days.

At one time, I did a bit of perl but now I see php alot. I was
wondering what you guys thinks of the pros/cons of perl and php.

If you intend for it to be the tool of the trade (to earn a living),
then PHP pays awfully low (at least in my country). Perl pays better,
but not as high as Java and C++, which are in greater demand.
If you want to just develop apps for websites, especially if you want
to collaborate with other developers on this, then PHP is the language
of the web these days (like it or not).
However, stuff written in Perl will run for a hundred years, PHP
doesn't seem to bother a lot with backward compatibility between major
releases, e.g. stuff written in php4 may not run in php5, really.
Also, Perl is a useful tool for a system administrator, if you swing
that way, and PHP isn't.
 
C

Charlton Wilbur

n> If you want to just develop apps for websites, especially if
n> you want to collaborate with other developers on this, then PHP
n> is the language of the web these days (like it or not).

This depends on the style of application and on the company you're
building it for. PHP is the language of the quick-and-dirty web, and
of the thin CRUD interface to a database system, but Perl, Python,
Ruby (on Rails), Java, and various proprietary Microsoft languages
also have very strong presences on the web. Which one is the best
choice really depends on the sort of application you're building, the
audience for the software and for the product, and a host of other
technical tradeoffs.

(Further, I'd advise against choosing a career path based on the
advice of an anonymous person in a newsgroup.)

Charlton
 
M

Michele Dondi

back into it. I liked "C" but Java seems like the way to go for
compiled langs, now days so I will learn that.

I wouldn't put them exactly on the same level. Perhaps Java is more
hype-like nowadays. IMHO you can safely start with it and then pass to
C if needed. Or the other way round. Both ways are viable IMHO. In one
you start nearer to the bare metal then get away
At one time, I did a bit of perl but now I see php alot. I was
wondering what you guys thinks of the pros/cons of perl and php.

Different beasts. Although I seem to have heard that php is now
available as a general purpose programming language too, that is
charachteristic typical of Perl, while the former is decidedly an
application specific one: i.e. thought to be embedded in HTML to
create dynamical pages.


Michele
 
M

Michele Dondi

btw do abigale (sp?) and larry still contribute? (that is how long ago
i did perl)

AbigAIL occasionally posts here. $Larry is active elsewhere.


Michele
 
K

krakle

At one time, I did a bit of perl but now I see php alot. I was
wondering what you guys thinks of the pros/cons of perl and php.

I am a Web Developer. It takes a lot more code in Perl than PHP to
accomplish simple tasks. Some may say (in this group) PHP is geared
towards beginners. They are wrong. PHP was created with the internet
in mind where as Perl wasn't. In my opinion there's only one way to
use Perl on the internet effectively and that is with mod_perl and a
framework like Maypole or Catalyst. But that comes with a whole
'nother set of problems and Pros and Cons.

In short... If you're developing for the internet and your only
choices are PHP and Perl, use what you know best! If you must choose
for other reasons... I would use PHP simply because it makes more
sense to use the right tool for the right job. Afterall, it was made
for that purpose. But really if you're looking for a JOB you may want
to take a look at ASP+C#.
 
M

Michele Dondi

towards beginners. They are wrong. PHP was created with the internet
in mind where as Perl wasn't. In my opinion there's only one way to

The internet or the web?


Michele
 
A

asimsuter

I am a Web Developer. It takes a lot more code in Perl than PHP to
accomplish simple tasks.


Really ? I find them both fairly concise.

Can you give an example perhaps ?

Regards.
Asim Suter
(e-mail address removed)



Some may say (in this group) PHP is geared
 
E

Emmanuel Florac

Le Tue, 12 Jun 2007 11:19:32 +0000, peter a écrit :
At one time, I did a bit of perl but now I see php alot. I was wondering
what you guys thinks of the pros/cons of perl and php.

php is a specialized tool. It's very good for the quick and dirty job, and
good for the kind of stuff you'll often find on thedailywtf.com or
codinghorror.com .
It has a lot of very nasty defaults that are mostly unvisible to the
beginner and the people without a "real" programming background, that will
bite you sooner or later :

- no real namespaces
- cluttered main function namespace
- lots of redundant functions with slightly different syntax and behaviour
- helps "bad programming" by mixing up html markup and php logic
- many security caveats; nothing similar to the "-T" flag in perl, or "use
strict", or "use warnings"
- syntax and defaults vary quite alot from version to version ; I had to
rewrite big parts of my php code to go from php 3 to 4, then 4.0 to 4.2,
then 4.2 to 5.0... Perl4 code written in 1992 works out of the box 99% of
the time with the current perl binary
- stupid typing : making things simpler for beginners make them unsortable
for everyone, see the ridiculous "==" and "===" comparison operators
- two entirely different object models in the current implementations,
php 4 and 5.

php pros :
- it's very easy to install and setup (it's made for windows users and
programming teenagers, not system administrators and real programmers)
- the php 5 object system is at last pretty good (but for perl, Moose
beats anything else on earth, and the default object system is the most
flexible for the knowledgeable)
- if you use php, you may have endless discussion on usenet/forums/IRC/AIM
with gazillions of beginners and bad programmers, about the bad ways to
get your bad code mostly working :)


--
Le commissaire : Comment vous appelez-vous?
Garance : Moi je ne m'appelle jamais, je suis toujours là. J'ai pas
besoin de m'appeler. Mais les autres m'appellent Garance, si ça peut
vous intéresser.
Prévert,"les enfants du Paradis".
 
K

krakle

Really ? I find them both fairly concise.

Can you give an example perhaps ?

Using a database.

If you want to use Perl effectively to compete with PHP you have to
utilize hefty modules and make use of mod_perl.
 
E

Emmanuel Florac

Le Sun, 17 Jun 2007 08:37:03 -0700, krakle a écrit :
If you want to use Perl effectively to compete with PHP you have to
utilize hefty modules and make use of mod_perl.

Not necessarily mod_perl. You may prefer Fast_CGI, for instance.
 
E

Emmanuel Florac

Le Sun, 17 Jun 2007 20:19:47 +0200, Petr Vileta a écrit :
In this point you are not right. You can use error_reporting(E_ALL /
E_STRICT ...)

Yes, but it's cumbersome and unpractical, and your error messages usually
end up in unsecure place, for instance the browser :) And nothing exists
with the huge security and power of "-T", nothing...
 
T

Tim Southerwood

(e-mail address removed) coughed up some electrons that declared:
...
Using a database.
If you want to use Perl effectively to compete with PHP you have to
utilize hefty modules and make use of mod_perl.


To be fair, to utilise PHP you need mod_phpX

Or you could run PHP as a CGI, which brings it back on a level footing with
the traditional use of perl. So I believe that neither language has a
disadvantage here.

But ... how do you find DBI.pm unconcise?

Agree about the "hefty module" though - perl is a general scripting
language, and was not targetted at the web. However, using mod_perl, I do
not see the use of hefty modules to be a particular disadvantage.

Cheers

Tim
 
B

Bart Lateur

In short... If you're developing for the internet
...
I would use PHP simply because it makes more
sense to use the right tool for the right job.

Only for small sites/pages.
 
S

skywriter14

Only for small sites/pages.

Please tell me why there are tons of web sites made with PHP as
compared to Perl or any other language, if PHP is worse than Perl and
Ruby. How does it survive? Not only the rookies program with PHP,
isn't it?

PS: I am someone who learned C first, then Java, then PHP, then Perl.
I use Perl for most of my works now. I think PHP is not anywhere close
to Perl for you, if you are a serious programmer. So you know that I
am a Perl lover.
 
C

Charlton Wilbur

S> Please tell me why there are tons of web sites made with PHP as
S> compared to Perl or any other language, if PHP is worse than
S> Perl and Ruby. How does it survive? Not only the rookies
S> program with PHP, isn't it?

That's pretty much exactly it. Rookies, and people who have other
systems to do the heavy lifting and just want a web interface to a
database system (for instance). Also, if you have shared web hosting,
you're likely to find that mod_php is enabled in Apache but mod_perl
is not, and in that kind of a situation PHP is likely to be less painful.

Charlton
 

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,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top