Live data from Hacker News

Comparing PHP, Perl, Python and Ruby

hyperpolyglot.org

41–50 of 92 posts

Re: Comparing PHP, Perl, Python and Ruby

#41
post #30
post #25

Earlier quoted context omitted.

It also means you have to stumble upon Moose to start using objects in a reasonably sane way. The average new Perl programmer is not going to go looking for a library that does object-oriented behavior until it's too late. They'll probably have some crazy idea that the language should be doing OO for them. If you were to navigate a largish Perl codebase today, you'd encounter the old-school bless, Moose trickiness, a…

>>The average new Perl programmer is not going to go looking for a library that does object-oriented behavior until it's too late. Sigh, please don't start language wars by stuff like assuming new programmers sits alone in an ivory tower and don't talk to people, read blogs or browse a new book. (Modern Perl discuss Moose before the old standard, for instance.) Edit: I'm just not going to touch where you assume all P…

[deleted]

Re: Comparing PHP, Perl, Python and Ruby

#42
post #30
post #25

Earlier quoted context omitted.

It also means you have to stumble upon Moose to start using objects in a reasonably sane way. The average new Perl programmer is not going to go looking for a library that does object-oriented behavior until it's too late. They'll probably have some crazy idea that the language should be doing OO for them. If you were to navigate a largish Perl codebase today, you'd encounter the old-school bless, Moose trickiness, a…

>>The average new Perl programmer is not going to go looking for a library that does object-oriented behavior until it's too late. Sigh, please don't start language wars by stuff like assuming new programmers sits alone in an ivory tower and don't talk to people, read blogs or browse a new book. (Modern Perl discuss Moose before the old standard, for instance.) Edit: I'm just not going to touch where you assume all P…

Why are there so many language wars-lovers in some open source communities...?

Probably the same reason the French don't like the English or the Indians don't like the Pakistanis. The closer two things are to each other, the more passionate people are about the differences.

My experience is that all the languages are identical. Python has a culture of cleanliness at the core, but there is a lot missing from the language that makes it unclean in practices. (See: the investment bank I worked where all new apps were written in a C#/C++/Python trialect, to coin a new word.) Perl is a very messy language, but the community has hyper-overreacted and have made a very clean set of "best practices". I haven't done much Ruby, but I can't say anything other than that it looks like a combination of Perl and Python, with a relatively new community around it.

These three languages are largely the same thing: they run slow and they're fun to write. Hence all the infighting.

Re: Comparing PHP, Perl, Python and Ruby

#43
post #32

Earlier quoted context omitted.

> I mean Wordpress flat out resisted PHP 5.0 for years. Years. Everything had to be done in PHP4. I presume that's because of the size of Wordpress' install base. The number of people who run their software on $9/month shared hosting environments is staggering. Many of those are late to upgrade PHP versions. Wordpress gets a lot of crap for being poorly written but the truth is that it's an example of software that w…

Wordpress gets a lot of crap for being poorly written because it is poorly written . There's no great mystery here. Yes, they deal with lots of different configurations. This is not unique in the history of software development. It's called "portability" and many organisations seem to be able to achieve it without compromising quality. My searing, eye-boiling hatred for Wordpress comes from administering it for what…

You are right it is far from perfect, it is pragmatic and providing a great amount of value for people/ businesses. It is surprising to me that we haven't seen a big challenger trying to do it right from a back end perspective.

Re: Comparing PHP, Perl, Python and Ruby

#44

sed begat awk. awk begat perl. perl begat python and ruby. python will get you a job at google. ruby will get you a job at twitter. php will get you a job at facebook.

python will get you a job at google

I used Perl for all of my job interviews at Google, and I work at Google.

But Google is a Java and C++ company, with some Python around (but a bit of an anti-scripting culture as well).

Re: Comparing PHP, Perl, Python and Ruby

#45

sed begat awk. awk begat perl. perl begat python and ruby. python will get you a job at google. ruby will get you a job at twitter. php will get you a job at facebook.

ruby will get you a job at twitter.

I heard that twitter are moving from ruby to scala.

Re: Comparing PHP, Perl, Python and Ruby

#46
post #43

Earlier quoted context omitted.

Wordpress gets a lot of crap for being poorly written because it is poorly written . There's no great mystery here. Yes, they deal with lots of different configurations. This is not unique in the history of software development. It's called "portability" and many organisations seem to be able to achieve it without compromising quality. My searing, eye-boiling hatred for Wordpress comes from administering it for what…

You are right it is far from perfect, it is pragmatic and providing a great amount of value for people/ businesses. It is surprising to me that we haven't seen a big challenger trying to do it right from a back end perspective.

Because users don't care about the backend. They care about the shiny features, look-and-feel and the availability of plugins and themes.

Wordpress delivers these in spades.

Re: Comparing PHP, Perl, Python and Ruby

#47
post #40
post #19

Earlier quoted context omitted.

True, but PHP 5.4 doesn't even have a stable release yet & many people haven't even adopted 5.3.

5.3 Come out in 2009, I has a small list of backwards compatibility breaking changes ( http://www.php.net/manual/en/migration53.incompatible.php ), no reason for anyone really not to have adopted it.

> many people haven't even adopted 5.3.

> no reason for anyone really not to have adopted it.

These things are not mutually exclusive. I.e. you could be write, but Klinky definitely is.

Re: Comparing PHP, Perl, Python and Ruby

#48

Wonderful reference for comparison! I admittedly haven't had time to pursue the whole table, but wanted to point out that there is indeed an increment and decrement in python: x += 1 x -= 1

They list those under "compound assignment operators", which makes sense given that += and -= are found in all of these languages. It's also worth noting that compound assignment operators do not form expressions in Python. So "i++" in PHP/Perl/Ruby is very different from "i += 1" in Python.

Re: Comparing PHP, Perl, Python and Ruby

#49
post #30

Earlier quoted context omitted.

>>The average new Perl programmer is not going to go looking for a library that does object-oriented behavior until it's too late. Sigh, please don't start language wars by stuff like assuming new programmers sits alone in an ivory tower and don't talk to people, read blogs or browse a new book. (Modern Perl discuss Moose before the old standard, for instance.) Edit: I'm just not going to touch where you assume all P…

Why are there so many language wars-lovers in some open source communities...? Probably the same reason the French don't like the English or the Indians don't like the Pakistanis. The closer two things are to each other, the more passionate people are about the differences. My experience is that all the languages are identical. Python has a culture of cleanliness at the core, but there is a lot missing from the langu…

Learning a language is an investment. People defend their investment strategies lest they be considered a fool. Attacking alternatives is a form of defense. I fear it's as simple as that.

Re: Comparing PHP, Perl, Python and Ruby

#50
post #47
post #40

Earlier quoted context omitted.

5.3 Come out in 2009, I has a small list of backwards compatibility breaking changes ( http://www.php.net/manual/en/migration53.incompatible.php ), no reason for anyone really not to have adopted it.

> many people haven't even adopted 5.3. > no reason for anyone really not to have adopted it. These things are not mutually exclusive. I.e. you could be write, but Klinky definitely is.

True, I think it is a valid point for arguments about language features though. Fair enough to say that anything in 5.4 isn't production ready yet or had the time to trickle down to hosts but you can't judge PHP on versions before 5.3 as anyone can put a small amount of effort in and have everything 5.3 has to offer.
Post reply on HN