I guess I'm just not so cavalier....
I guess I'm just not so cavalier....
Posted Mar 25, 2010 14:22 UTC (Thu) by Simetrical (guest, #53439)In reply to: I guess I'm just not so cavalier.... by robla
Parent article: Resetting PHP 6
Pretty much all of us MediaWiki developers hate the language passionately
and wish we were using something else. (Although, not all of us agree on
what that something else should be.)
PHP is *not* easier to learn than, say, Python. That's just not true IMO.
And it's definitely not true that MediaWiki wouldn't have existed if not for
PHP. phase2 was written in Perl, IIRC, and it was a couple of people's
decision to pick PHP for phase3 -- it would have been written either way.
Posted Mar 25, 2010 18:21 UTC (Thu)
by robla (subscriber, #424)
[Link] (5 responses)
The thing that PHP has historically had going for it is mod_php, which was
for a very long time way better than mod_perl and mod_python. It had the
added benefit of being turned on by default in many contexts (e.g. cheap
web hosts). That sort of availability made web programming a lot more
accessible to a lot more people. That's not really a triumph of language
design so much as interpreter design, but I do find it peculiar that Perl
and Python couldn't beat PHP in this area, given the long headstarts they
had.
Speaking of interpreter design, I think Python's Global Interpreter Lock is
something that bears every bit as much scrutiny as any of PHP's
deficiencies. While I'm not interested in starting a PHP vs Python
flamewar (I happen to be primarily programming in Python these days), I
think this just goes to show you that there's always tradeoffs in picking
languages.
Posted Mar 25, 2010 19:58 UTC (Thu)
by Simetrical (guest, #53439)
[Link] (4 responses)
If web hosts used something else, web apps would be written in something else. It's that simple. Wordpress and Drupal are web apps that happen to be written in PHP, not consequences of PHP's existence. I'd bet that they're written in PHP because that's how you reach the largest audience, because that's what webhosts use.
The Python GIL is a nonissue if you're running single-threaded code. Does PHP support multithreaded execution at *all*?
Posted Mar 25, 2010 21:18 UTC (Thu)
by foom (subscriber, #14868)
[Link] (1 responses)
Not really...Python doesn't properly support multiple distinct interpreters within a process -- you
So of course that means you can't run python (efficiently) within a threaded apache.
Posted Mar 25, 2010 22:31 UTC (Thu)
by Simetrical (guest, #53439)
[Link]
Posted Mar 25, 2010 23:29 UTC (Thu)
by JoeF (guest, #4486)
[Link] (1 responses)
Yes, it does.
Posted Mar 26, 2010 13:51 UTC (Fri)
by foom (subscriber, #14868)
[Link]
Sorry, I'd forgotten about the UseModWiki days, though I'm going to bet
that the anti-PHP crowd here doesn't really have a higher opinion of Perl.
At any rate, Wordpress and Drupal still qualify, and there's a ton of other
really useful software that falls into that category.
I guess I'm just not so cavalier....
I guess I'm just not so cavalier....
I guess I'm just not so cavalier....
can do it, but they aren't properly isolated from each-other. One important way they aren't isolated:
they all share the same GIL. So, you can't even properly run multiple single-threaded python
interpreters within a multithreaded process. It works, but only one thread can actually run at a time,
across all interpreters.
I guess I'm just not so cavalier....
Apache, and it's generally advised that mod_php users stick to prefork or
FastCGI. So this isn't a big advantage for PHP.
Does PHP support multithreaded execution at *all*?I guess I'm just not so cavalier....
But a large part of the third-party modules are not thread-safe, so unless you limit yourself to what you can run (and test the hell out of things), you are better off not running a multithreaded build of Apache.
I guess I'm just not so cavalier....
- do most modules blow up by default on windows? That seems like a problem that their authors
would want to fix.