6 ms·
I still don't understand why php is so frowned upon here. Easy and quick implementation and a low learning curve.
by quizbiz 17y ago
I still don't understand why php is so frowned upon here. Easy and quick implementation and a low learning curve.
- jamongkad 17y agoSpeaking 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.
- jacquesm 17y agoI'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.
- zaidf 17y agoWhat python framework do you use?
- jamongkad 17y agoPylons.
- nostrademons 17y agoThere'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.
- aniketh 17y agoWouldn't it be possible to write any additional functionality as a PHP extension in C/C++? This effectively becomes low entry with immense power...
- strlen 17y agoC/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.
- nir 17y agoApparently 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.
- nostrademons 17y agoWordpress 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.
- code_duck 17y agoDidn'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.