I guess I'm just not so cavalier....
I guess I'm just not so cavalier....
Posted Mar 25, 2010 5:42 UTC (Thu) by robla (subscriber, #424)In reply to: just kill it by b7j0c
Parent article: Resetting PHP 6
people to start programming who might not have ever gotten slurped into
programming. The apps created by those new developers (e.g. Wordpress,
MediaWiki, Drupal, etc) are applications that are running some of the
highest traffic websites in the world. While those applications could have
been written by "real" programmers in "good" programming languages, the
fact of the matter is that the "real" programmers just didn't have the time
or inclination to write those apps. So, now we have a lot of great
applications that may not be so pretty under the hood, but they often still
do the job better than any other application out there, and may not have
otherwise existed had PHP not been around.
Want to see something kinda funny? Check out http://www.haskell.org/ I
doubt you're going to find too many people out there that would lump
Haskell in with the "bad" languages. In fact, it could very well be
something a lot of us are writing production apps in a decade from now.
However, guess what they're using to host haskell.org...:
http://www.haskell.org/haskellwiki/Special:Version
Posted Mar 25, 2010 14:22 UTC (Thu)
by Simetrical (guest, #53439)
[Link] (6 responses)
PHP is *not* easier to learn than, say, Python. That's just not true IMO.
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]
Posted Mar 25, 2010 17:12 UTC (Thu)
by b7j0c (guest, #27559)
[Link]
is it possible to write a great app in php? yes
have some people done it? yes
do most people who have done it want to consign php to the dustbin of history? YES
I guess I'm just not so cavalier....
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.)
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.
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.
I guess I'm just not so cavalier....