News for hackers. Stuff that matters.
Re:Joe Stump: Why I switched from PHP to Python by zokier on Friday September 04, 2009 @05:30PM (#805780)
Does one really need to explain why he switched from PHP to anything?
Re:Joe Stump: Why I switched from PHP to Python by sophacles on Friday September 04, 2009 @05:35PM (#805792)
This sort of thing is still needed. I have a friend who's boss wont let him use anything except c, php, and perl. Any attempts to get python in there are met with resistance and vague hysteria. More posts like these from can slowly lower people's loyalty to php, and contribute to saving my friend and many like him.
Re:Joe Stump: Why I switched from PHP to Python by jrockway on Friday September 04, 2009 @06:32PM (#805881)
Well, is Perl really a problem? Anything you can do in Python you can do in Perl just as easily; Perl actually has more abstractions available for the programmer than Python. (Grammars in regexes, real closures, coroutines, a metaobject system, etc.)

Also, last time I checked the programming language shootout, Perl 5.10 is slightly faster than Python 3.

So with that in mind, the logical "step up" from Perl would be something like Haskell. Python is pretty much Perl with different syntax, less features, and the impression that it's "cleaner" because nobody ever bothered using it for "quick and dirty" scripting.

Re:Joe Stump: Why I switched from PHP to Python by rbanffy on Friday September 04, 2009 @07:10PM (#805932)
"Anything you can do in Python you can do in Perl just as easily"

I can't read my Perl code from six months ago like I can read my Python code ages ago.

There are far too many ways to do the same thing in Perl, not every one of them obvious. And I disagree with my past self a lot.

Re:Joe Stump: Why I switched from PHP to Python by kingkongrevenge on Friday September 04, 2009 @10:07PM (#806066)
I'm always a bit puzzled by these claims of unreadable perl. Go find me perl I can't read: http://search.cpan.org/ . Where is it?
Re:Joe Stump: Why I switched from PHP to Python by plinkplonk on Friday September 04, 2009 @10:17PM (#806073)
"I'm always a bit puzzled by these claims of unreadable perl."

unreadable for the claimants not for you.

"Go find me perl I can't read .. Where is it?"

Any language, no matter how obscure, will have some practitioners who can read any code written in it.

I am sure someone can say this about APL "What do you mean APL is unreadable? I can read any APL code fragment".

To repeat, they are saying they can't read it not that you can't. Don't take it personally. Use what works for you.

Re:Joe Stump: Why I switched from PHP to Python by staunch on Friday September 04, 2009 @11:50PM (#806162)
It's a totally bogus claim. The only people that can't read their own Perl after 6 months are the people that don't really know Perl. And by "know" I just mean they read and understood most of Programming Perl/Objected Oriented Perl.

Anyone who has studied those two books can understand 99%+ of the code on the CPAN.

A lot of people have made a few halfhearted attempts at using Perl and were so put off by the scary looking sigils that they gave up. Then they blame Perl to comfort themselves. It's not them that's too lazy to look past a new kind of syntax, it's the language's fault!

Re:Joe Stump: Why I switched from PHP to Python by plinkplonk on Friday September 04, 2009 @11:57PM (#806168)
"The only people that can't read their own Perl after 6 months are the people that don't really know Perl."

again replace "perl" with "APL" or "BrainFuck" (or any language with baroque syntax) and the above sentence is as (in)valid. This comes close to the "No True Scotsman" fallacy. If you really knew perl you would have no problems with reading it. Sure, but that applies to anything, no matter how convoluted.

It doesn't matter whether you think their claims are "bogus" or not, or whether they meet your standards of "really" knowing perl.

Some people find that they can read their own code in other languages easier than their own code in perl after 6 months. You might think this "bogus", that doesn't matter. For them, that is a reality they have to deal with. And many deal with it by shifting to other languages and leaving perl to its aficionados. This is as it should be. Everyone should use the language they like and not use languages they dislike (irrespective of my or your stances on what they should like or whether their claimed reasons for dislike is "bogus").

Nobody is compelling you to abandon perl. So what's your problem with them not using perl?

A language is a UI for programmers. Some people find some UIs hard. Telling them that their discomfort is "bogus" is not very useful.

I use a lot of Haskell. Many people say they find its type system, monads etc "too hard". That isn't a "bogus claim". And "If they really knew Haskell they wouldn't find it hard" (where I define the "really knew") is a useless statement.

I use Haskell, they don't. Everyone is happy.

Live and let live. There are enough languages for all of us.

Re:Joe Stump: Why I switched from PHP to Python by staunch on Saturday September 05, 2009 @12:08AM (#806180)
Perl requires that you learn a bit before you can be comfortable reading/writing it naturally. Like Japanese Katakana characters or the Cyrillic alphabet, a little investment goes a very long way. It's not nearly as alien as it appears at first glance.

Some people think Perl is a good deal more expressive and powerful for them. A whole lot more people would if they managed to get past their initial reaction.

Python probably owes most of its success to its simplistic syntax. That is definitely a feature when you're learning. When you're going to spend years with a tool though it's often worth investing some time into new concepts.

More people should probably learn Haskell if they want to be better programmers. I think more should learn Perl too.

Re:Joe Stump: Why I switched from PHP to Python by plinkplonk on Saturday September 05, 2009 @12:17AM (#806189)
"Perl requires that you learn a bit before you can be comfortable reading/writing it naturally. Like Japanese Katakana characters or the Cyrillic alphabet, a little investment goes a very long way. It's not nearly as alien as it appears at first glance."

This is, no doubt, true. But if people find that for a lesser investment (in say Python or Ruby) they can get all the (or almost all the) benefits of learning perl, it is natural they prefer those languages.

If a hypothetical English speaker were to be given the choice of learning French or Japanese and if he could get his work done with either language equally well (this is where programming languages differ from spoken languages) why is it a problem that someone chooses to learn French (an English speaker could be fluent in french in year or so, Japanese would take years) instead of Japanese? A Chinese speaker might prefer to learn Japanese vs French and that's fine too.

Focussing on perl specifically, unless I am maintaining a legacy codebase or I have a situation where libraries I need exist only in perl (and not, say in Python) why should I learn perl in preference to (say) Python?

I can imagine making a case for learning Haskell in preference to Python (or vice versa!) but perl Python and Ruby are largely equivalent in practice and at least to some people Python is easier to read than perl.

"Some people think Perl is a good deal more expressive and powerful for them. A whole lot more people would if they managed to get past their initial reaction."

I agree. The counterpoint is that there are equally powerful and expressive languages where I don't need to get past the initial reaction. To some people aesthetics matter. And aesthetics is subjective.

Re:Joe Stump: Why I switched from PHP to Python by staunch on Saturday September 05, 2009 @12:27AM (#806194)
I don't really disagree that Ruby/Perl/Python are roughly in the same league of power. I do think some people may find that Perl is a good deal more productive/expressive/powerful for them. The Moose object system, CPAN, Catalyst, DBIx::Class. Perl has some amazingly awesome stuff going for it now and I think it's a shame that many people never discover that because of the stigma surrounding Perl's syntax.

It's tiresome seeing the same old superficial argument about Perl's sigils. I'd like to see more discussion about how much more powerful and advanced Perl's Moose object system is than Python's :-)

Re:Joe Stump: Why I switched from PHP to Python by plinkplonk on Saturday September 05, 2009 @12:31AM (#806196)
"I'd like to see more discussion about how much more powerful and advanced Perl's Moose object system is than Python's :-)"

:-) I agree this would be a fruitful line of discussion. I know next to nothing about Perl and while (as of now) I have no intention of learning Perl, it would be great if someone (you? :-D ) were to write (or submit) such a post to HN

Re:Joe Stump: Why I switched from PHP to Python by rbanffy on Saturday September 05, 2009 @10:32AM (#806562)
"Some people think Perl is a good deal more expressive and powerful for them. A whole lot more people would if they managed to get past their initial reaction."

Don't shoot me, but I also observe a similar symptom with high-priced and/or hard-to-move-away-from "corporate" (as in "boring") products. The more your company invested in said product, the more successful the enterprise will show up on internal communications, with little or no correlation however badly it failed.

People get attached to their investments, be they money, time or self-esteem. Or, in the corporate case, the jobs of the people who signed the check.

As for Python, as a long time pythonista, I can tell you there are many steps to Python-zen, exactly like what happens with Perl (I did a lot of Perl between 95 and 2002). The simplistic syntax hides a lot of power that elude the newbie. When I review my early code, I see it as childish and crude.

If someone wants to learn new languages, I always advise them to learn something as different and "alien" from his/her comfort zone as possible. Haskell is a good choice, a Lisp like Clojure or Scheme is another. And by learn I mean taking a couple years as a side hobby to do increasingly difficult problems, perhaps some you already took with your comfortable-set. It _has_ to be an enlightening experience or it loses the purpose.

Re:Joe Stump: Why I switched from PHP to Python by jacquesm on Saturday September 05, 2009 @04:42AM (#806353)
No language should require people to 'advocate' it to other people, a language should stand on its own merits, the free choices made by people that have those choices available to them are all that matters.

The more vocal the advocates the more the it feels as if the choice is no longer free, that will be reflected in a resistance to observe the language objectively, some of the feeling has already been spoiled by the abrasive attitude of the proponents. Erlang suffered quite a bit from that when people started spamming HN with Erlang articles to flood other items off the new page. It could be an excellent language, but in the eyes of some it is a language associated with anti-social behaviour.

If perl were easier to learn it would lose some of its power, so maybe it is not possible to have a language that fits the bill for everybody.

These trade-offs are to be expected and are in no way a detraction, that is why we have many different programming languages in the first place. One size does not fit all.

Re:Joe Stump: Why I switched from PHP to Python by jrockway on Saturday September 05, 2009 @02:26PM (#806850)
A language should stand on its own merits, but many of the practitioners of programming are not in a position to make an informed evaluation. They are happy if they can remember the difference between an object and a class. The difference between type systems, meta object protocols, syntax extension mechanisms, and so on are going to be lost on them. They don't care, and they don't care to care. (So it's not an issue of "I haven't learned that yet", it's "I never plan to learn more".)

With this in mind, some advocacy is necessary to steer the field in a direction that is pleasing to those that know more. The advocates are just trying to help these people get more out of programming than they are going to get from $simple_language (Java, PHP).

The problem, however, is that many of the advocates are advocating because they randomly picked programming language $foo, think it's good enough, and have never tried anything else. Their advocacy is designed to recruit other followers to justify their own decisions. And that is very silly.

It is especially amusing when this type of advocate attacks the first kind of advocate. The argument is always, "well, but my code works". "Erlang works for phone switches!" "PHP can talk to a MySQL database!" Well, OK, but are you positive those things couldn't be done better in a different language? (The answer is usually, "uh, well, no...", but I digress.)

Re:Joe Stump: Why I switched from PHP to Python by jacquesm on Saturday September 05, 2009 @04:52PM (#807009)
That's a good point, plenty of advocacy seems to stem from 'it is what I use so therefore it must be good, if not the best'.

There seems to be an awful lot of that happening.

Re:Joe Stump: Why I switched from PHP to Python by jjs on Saturday September 05, 2009 @12:03AM (#806174)
> The only people that can't read their own Perl after 6 months are the people that don't really know Perl. And by "know" I just mean they read and understood most of Programming Perl/Objected Oriented Perl.

Python taught me that there's no excuse for a language to have a learning curve like Perl's.

Re:Joe Stump: Why I switched from PHP to Python by staunch on Saturday September 05, 2009 @12:16AM (#806187)
So no language should use any syntax/concepts that aren't familiar to someone who only knows Java/C?
Re:Joe Stump: Why I switched from PHP to Python by jjs on Saturday September 05, 2009 @03:05AM (#806305)
No; no [programming] language should require two books and several months to be fluent in.
Re:Joe Stump: Why I switched from PHP to Python by gdp on Saturday September 05, 2009 @07:44AM (#806425)
That's actually almost exactly the same thing as claiming that no language should be very different to everything else that has come before it.

I'm really not a Perl fan, but I really don't buy readability arguments. I'm a functional programmer, and the exact same feeble criticisms are leveled against ML and Haskell and Lisp and Scheme and whatever else. People say "ugh! It's so unreadable!", when they really mean "I can't read that having spent 2 days learning this new language, but I find it very easy to read C/PHP/Java/whatever, which I've been doing for several years".

It can take a very, very long time to actually become fluent in a programming language and paradigm to the point where you actually have a mental model of its semantics that is aligned with reality. This is why rookie programmers tend to get things wrong.

I spent almost 6 months learning Prolog. If I went and tried to write prolog now, I doubt I could remember very much at all. I've done C for more like 10 years, and I can still write C reliably despite not having touched it for 2 or 3 years.

So I don't buy it. I'm really not a Perl fan (nor a Python fan), but the idea that it's worse than python because it requires more intellectual effort to learn is bullshit, unless you're having a programming-for-people-of-limited-intelligence competition.

Re:Joe Stump: Why I switched from PHP to Python by jjs on Saturday September 05, 2009 @09:50PM (#807356)
Scheme can indeed be learned in a day, if you understand the programming model.

And my standards for a programming language's learning curve applies to experienced programmers. It's just a happy coincidence that python offers a gentle learning curve for new programmers as well.

Re:Joe Stump: Why I switched from PHP to Python by gdp on Monday September 07, 2009 @11:08AM (#809246)
And wrestling alligators can be learned in five minutes if you already know how to wrestle crocodiles.

> if you understand the programming model

Right, learning the syntax of a programming is easy and quick, if you already understand the programming model.

I argue that it is difficult to learn new programming models in general.

Re:Joe Stump: Why I switched from PHP to Python by jjs on Thursday September 10, 2009 @10:14PM (#816662)
> Right, learning the syntax of a programming is easy and quick, if you already understand the programming model.

Or at least, it should be. Hence my criticism of Perl.

Re:Joe Stump: Why I switched from PHP to Python by rw on Saturday September 05, 2009 @08:27AM (#806459)
> Any language, no matter how obscure, will have some practitioners who can read any code written in it.

So you haven't seen the Malbolge language, then? http://www.lscheffer.com/malbolge.shtml

Re:Joe Stump: Why I switched from PHP to Python by kragen on Saturday September 05, 2009 @10:44AM (#806569)
While APL has its problems, baroque syntax is certainly not among them! You can write an APL parser on a napkin. With a felt-tip marker.
Re:Joe Stump: Why I switched from PHP to Python by codexon on Friday September 04, 2009 @09:56PM (#806058)
Re:Joe Stump: Why I switched from PHP to Python by igouy on Saturday September 05, 2009 @12:45PM (#806730)
> Python 3 smokes Perl.

Are those Perl programs written to use multiple cores?

> And most people are using 2.x which is even faster.

All the 1/1 and 1 make them seem pretty much the same.

http://shootout.alioth.debian.org/u32/benchmark.php?test=all...

Re:Joe Stump: Why I switched from PHP to Python by jrockway on Saturday September 05, 2009 @02:37PM (#806863)
That is not "smoking", that is "pretty much the same".

If you want to see Python being smoked: http://shootout.alioth.debian.org/u32q/benchmark.php?test=al...

Re:Joe Stump: Why I switched from PHP to Python by kingkongrevenge on Friday September 04, 2009 @10:18PM (#806076)
That's winning at the special olympics. They are both so slow you'd never use either for cpu constrained tasks.
Re:Joe Stump: Why I switched from PHP to Python by sandGorgon on Friday September 04, 2009 @11:07PM (#806126)
That is plain offensive. The special olympics are an even greater achievement of the human body as a machine, since it must push itself with far lesser degrees of freedom.
Re:Joe Stump: Why I switched from PHP to Python by pieceofpeace on Saturday September 05, 2009 @12:22AM (#806192)
As I saw, it was not meant to be offensive. Special olympics are for special people. They are not the best among all competitors. Most interpreted languages are not comparable to compiled languages.
Re:Joe Stump: Why I switched from PHP to Python by jrockway on Saturday September 05, 2009 @02:34PM (#806860)
Neither Perl nor Python are interpreted. They are both just slow.
Re:Joe Stump: Why I switched from PHP to Python by gaius on Saturday September 05, 2009 @03:37AM (#806317)
Why not? NumPy offloads all the heavy lifting to LAPACK and BLAS which is some of the most optimized code on the planet. Numeric work in Python is bread-and-butter for many people.
Re:Joe Stump: Why I switched from PHP to Python by jacquesm on Saturday September 05, 2009 @04:48AM (#806358)
Agreed. I have a bunch of pretty CPU intensive stuff written in C that was optimized as much as I could, given the time I had to write the code.

I re-wrote the same code using python on a lark to see how bad it would be, colour me very surprised when it actually beat the original code by a considerable margin!

Re:Joe Stump: Why I switched from PHP to Python by kingkongrevenge on Saturday September 05, 2009 @09:35AM (#806507)
Perl has all these same libraries and more. We were talking about code in the actual language.
Re:Joe Stump: Why I switched from PHP to Python by sophacles on Friday September 04, 2009 @07:16PM (#805936)
Perl itself is not the problem. According to my friend, the problem comes from available tools: the ones he needs already exist for python but not for perl.

As for quick and dirty scripting in python: I do it all the time. Hell I just made a little "framework" [1] in python to do this better. I missed the while <> construct from perl for doing filters, so I made it easier to do in python. The funny thing is, many of my quick and dirty python scripts end up looking like more thought was put into them, and being more flexible, than they were ever intended to be.

[1] http://pypi.python.org/pypi?name=pyCLiFF&version=0.1&...

Re:Joe Stump: Why I switched from PHP to Python by zaphar on Friday September 04, 2009 @11:01PM (#806101)
Thats funny. I could say the same thing about the perl scripts I write. For that matter I could say the same thing The point is language and syntax for some of us at least has little bearing on how clear the code is. And like jrockway said perl is expressive enough that you can do far more abstraction in it. The only languages I've seen so far that can beat perl for expressive power are lisp and haskell.
Re:Joe Stump: Why I switched from PHP to Python by jamongkad on Friday September 04, 2009 @11:39PM (#806154)
As long as Python continues to not utilize multi-line lambdas. Then Perl and Ruby will continue to be a usable Lisp. But I don't think that's a bad thing. Python is Python and that's that.
Re:Joe Stump: Why I switched from PHP to Python by kingkongrevenge on Friday September 04, 2009 @10:09PM (#806068)
> the ones he needs already exist for python but not for perl

Rather unlikely.

Re:Joe Stump: Why I switched from PHP to Python by gaius on Saturday September 05, 2009 @03:38AM (#806318)
No really, hence the saying "only Perl can parse Perl". Despite its dynamic typing, Python is quite amenable to tool support because of its regularity.
Re:Joe Stump: Why I switched from PHP to Python by tptacek on Friday September 04, 2009 @09:14PM (#806024)
"Perl with different syntax" is a prolix way of saying "better". ;)
Re:Joe Stump: Why I switched from PHP to Python by nostrademons on Saturday September 05, 2009 @12:11AM (#806183)
Sometimes taking out features is more important than having them. Python fans usually like it because every feature is exceptionally well-thought-out, not because there are a lot of features.
Re:Joe Stump: Why I switched from PHP to Python by jrockway on Saturday September 05, 2009 @01:53PM (#806821)
I have never heard anyone refer to Python's lambdas as "exceptionally well-thought-out" before.

Python, like any programming language, is not perfect. There's simply less to not be perfect.

Re:Joe Stump: Why I switched from PHP to Python by jamongkad on Saturday September 05, 2009 @09:14PM (#807325)
Agreed not everything in Python is well thought out. Lambdas and .join comes to mind.
Re:Joe Stump: Why I switched from PHP to Python by igorgue on Friday September 04, 2009 @06:20PM (#805863)
Well, I'm actually in the same problem, but I inject Python every time I can, because is not the same saying:

"Can I do this in Python?"

than

"I already did this in Python!"

Re:Joe Stump: Why I switched from PHP to Python by aristus on Friday September 04, 2009 @06:49PM (#805905)
That often works, but if you don't then teach others on the language and your code it will get ripped out the minute after you leave.
Re:Joe Stump: Why I switched from PHP to Python by quizbiz on Friday September 04, 2009 @09:14PM (#806025)
I still don't understand why php is so frowned upon here. Easy and quick implementation and a low learning curve.
Re:Joe Stump: Why I switched from PHP to Python by nostrademons on Saturday September 05, 2009 @12:03AM (#806175)
There's a complexity ceiling that you hit fairly quickly in PHP. Since there's no consistency in any of the libraries, you have to cram a massive amount of information into your head (or sit there with the reference manual open and look up every function call). If you're doing a quick one-week project, PHP is probably the tool of choice, but there's a large middle ground where PHP apps become way too spaghetti-ish and yet you don't want to shell out the upfront cost for a C++ or Java webapp.
Re:Joe Stump: Why I switched from PHP to Python by nir on Saturday September 05, 2009 @12:42PM (#806724)
Apparently Wikipedia, Facebook, Flickr, Wordpress.com, Facebook, Yahoo, Digg... haven't hit that complexity ceiling yet :) (Some of these use other languages as well, but AFAIK it's stuff like Java or Erlang for particular tasks)

PHP is far from perfect, and personally I've also moved from it to Ruby and Python, but the automatic "switch from PHP to anything" on a language that powers so much of the web is meaningless.

Re:Joe Stump: Why I switched from PHP to Python by nostrademons on Saturday September 05, 2009 @04:05PM (#806959)
Wordpress has definitely hit the complexity ceiling; just look at all the security vulnerabilities and random bugs published for it. ;-)

FaceBook and I think Yahoo both make heavy use of an RPC-based, service-oriented architecture. They use PHP for the frontend but then call out to backends to do any sort of complicated processing. This is basically the only sane way to architect a large system. While I think their choice of PHP to power the front-end is regrettable (it's a major reason why I didn't apply to FaceBook), it's at least defensible.

And I'm also a PHP->Python refugee - I used PHP on a bunch of projects in college, one of which got to the 100k-to-million-user range. I would not take a PHP job unless I was desperate for cash; I hate the language that much.

Re:Joe Stump: Why I switched from PHP to Python by nir on Saturday September 05, 2009 @06:30PM (#807148)
AFAIK in its recent versions PHP doesn't have any unique design flaws that make them more vulnerable to attacks. In fact, being the most widely deployed web language means it probably had more security patches than most. Bugs and vulnerabilities in applications are certainly not unique to PHP..

I wouldn't take a PHP gig either. I would also prefer Ruby work to Python, since I enjoy it more. But that's my selfish interest as developer, it doesn't mean that for the project itself PHP isn't, sometimes, the best option for the project.

For people who want to create a web app and don't have much programming experience, PHP can still be the best choice - it's easy to deploy, it has great official and unofficial docs, it's easiest to find developers for and it's pretty reliable.

Now, this may sound crazy to many, but not only PHP has some good sides, a lot of them come from intelligent choices its designers made: for example, PHP script only runs in context of the request - no application server here - which helps reliability since memory leaking etc scripts can't cause too much harm. PHP's basically saw itself merely as an Apache module - in a rare, pre-hyposhpere display of egoless coding - making it extremely easy to deploy (compare and contrast with Rails before Passenger). The fact it comes with so many libraries welded into the common namespace is ugly for me, but a boon for beginners, and the fact you can mix PHP and HTML allowed many web designers to tinker with it, gradually moving from design to HTML to PHP - one of whom ended up writing Wordpress, I think :)

Re:Joe Stump: Why I switched from PHP to Python by strlen on Saturday September 05, 2009 @04:39PM (#806991)
With the (possible?) exceptions of Wikipedia and WordPress PHP is used by these sides for the fairly thin front-end layer. The core algorithmic functionality is implemented in (usually) Java and C++ and occasionally Erlang, Python and Perl.

In fact, I am willing to argue that there's more reason to use something else if your app is simpler (i.e. it's a monolithic web application): you can add functionality without resorting to a more complex multi-tier/service oriented architecture or writing C-based extensions.

Re:Joe Stump: Why I switched from PHP to Python by nir on Saturday September 05, 2009 @06:34PM (#807155)
The article is about PHP & Python. Erlang, C++ and Java don't really compete in the same space - I doubt writing any of these sites in Python would mean they wouldn't need Erlang or C++.
Re:Joe Stump: Why I switched from PHP to Python by strlen on Sunday September 06, 2009 @03:29AM (#807583)
Python is, in many cases, a serious contender for Java and C++. E.g. if you're dealing with any sort of machine learning (suppose you wish to add a recommendation engine to your site), Python (e.g. with NumPy) is more than capable of that (although these scripts will generally ran standalone, they could still use the same libraries for fetching user data).

Yes, there are many cases where Python/Perl/Ruby can't do what Java/C++/Erlang can, but their capabilities stretch far longer than those of PHP. PHP essentially limits you to front-end web development; writing standalone scripts/tools/daemons in PHP -- been there, when a boss at a startup I worked in refused to allow me to use any other language -- is horribly painful.

There's a progression between "simple CRUD pages" and "complex, service oriented architecture". Python can fill a lot more on that continuum.

Re:Joe Stump: Why I switched from PHP to Python by aniketh on Saturday September 05, 2009 @11:42AM (#806639)
Wouldn't it be possible to write any additional functionality as a PHP extension in C/C++? This effectively becomes low entry with immense power...
Re:Joe Stump: Why I switched from PHP to Python by strlen on Saturday September 05, 2009 @04:46PM (#807001)
C/C++ are low level languages. C++ has object orientation, but talking to C++ from Zend is very tedious (if I am not mistaken, you essentially end up passing objects as void pointers).

Python, Ruby, Perl, Java, Erlang, allow you to do systems-programming (i.e. writing daemons, doing threading and high performance event driven/non-blocking I/O) while still retaining high-level features such as reflection/meta programming.

Re:Joe Stump: Why I switched from PHP to Python by jamongkad on Friday September 04, 2009 @11:32PM (#806145)
Speaking as someone who is tangled in a love triangle between Python and PHP. I do agree that PHP does have it's strengths. For the programmer just making a living, it's quite ok to etch out just using it.

In terms of web applications, what you can accomplish in PHP you can pretty much do in Python. But the difference comes in when you do "care" about the tools you're using.

When you want that extra power. When you want something sane to work with.

Python and friends give provide that for you.

I do love PHP, it's deployment is a snap and the frameworks we have now are kick ass. But Python is such a joy to work with it. And the longer I work with it, it gets harder to come back to PHP.

Re:Joe Stump: Why I switched from PHP to Python by jacquesm on Saturday September 05, 2009 @04:32AM (#806347)
I'm at the stage where the temptation to use PHP for something quick & dirty (a one-off script or so) is still very strong, mainly because I know all the details by heart and can pretty much realize the script as fast as I can type it in.

In python it would take me a bit more time and that time is not always available.

But the future is clear to me, no more PHP if I can help it. There are plenty of things that irritate me about python, but they are mostly things that you learn about, then it stays learned.

PHP keeps throwing up new ways to trip you up even after years of using it.

In a way I'm glad to have gone this route, in spite of the learning curve with python (and Django), I can already see it pay off when I see functions shrink to 1/3rd the size they were using PHP.

The only thing really still missing from the python under apache model is a multi threaded shared state environment.

That would really allow you to blow other solutions out of the water in terms of speed.

Now you still have to make that round trip to the database on the next page fetch.

Re:Joe Stump: Why I switched from PHP to Python by zaidf on Saturday September 05, 2009 @05:52PM (#807092)
What python framework do you use?
Re:Joe Stump: Why I switched from PHP to Python by jamongkad on Saturday September 05, 2009 @08:58PM (#807313)
Pylons.
Re:Joe Stump: Why I switched from PHP to Python by code_duck on Saturday September 05, 2009 @09:53AM (#806526)
Didn't the article just explain that?

I use PHP every day, but have grown a bit tired of the lack of sophistication inherent in the language. The huge flat namespace, the inconsistent design of the standard library, the absence of advanced language features (functions aren't even a first class data member), and so on.

Re:Joe Stump: Why I switched from PHP to Python by ojbyrne on Friday September 04, 2009 @07:33PM (#805955)
It's all about the self-promotion. Joe works hard to get his image out there.