Earlier quoted context omitted.
> It's a garbage language. I'm overwhelmed by how rich of a statement that is.
Its accurate.
Taking PHP Seriously
81–90 of 673 posts
Re: Taking PHP Seriously
#82I work on PHP at my day job (in a public company), before this, I came from Ruby, and .NET before that. I'm convinced the reason so many successful projects use PHP, is not because of any inherent nature of the language. I think it's the people who use it. They just don't care. A successful project needs to be started by someone that cares just enough, but not too much. If you're programming in PHP, you're not runnin…
> "The next guy to join the company will clean up your shit" Is that acting in the best interest of your employer? or ripping your employer off? I think more like the latter. Imagine if other professions behaved like this, like finance or legal people. But suddenly because you are an "engineer" this is acceptable? If I was your boss I would fire you immediately. The world of difference between balancing trade-offs in…
Re: Taking PHP Seriously
#83I work on PHP at my day job (in a public company), before this, I came from Ruby, and .NET before that. I'm convinced the reason so many successful projects use PHP, is not because of any inherent nature of the language. I think it's the people who use it. They just don't care. A successful project needs to be started by someone that cares just enough, but not too much. If you're programming in PHP, you're not runnin…
Whatever I would say about PHP - how good or bad is - I am almost forced to use it - In central/eastern europe almost any company uses it to develop web-backend... but I really would love to jump to Node/Go/Golang-based development team (maybe even remotely).
[1]: http://laravel-recipes.com/recipes/60/optimizing-the-framewo...
Re: Taking PHP Seriously
#84The article points out that arguably the best part of PHP is the "shared nothing lifecycle". That each request starts new, and the process dies at the end of the request. It's by far my favorite part, and I completely agree that it makes "reasoning about" (boy do I hate that phrase...) your program much easier. Why are there no other "competitors" in this space? Why do most other languages go with the alternative rou…
Here is an example in C: https://www.cs.tut.fi/~jkorpela/forms/cgic.html
Php was born out of trying to reduce a lot of that cruft and blending code and html output easily. And that's what initially made it a winner.
Re: Taking PHP Seriously
#85Earlier quoted context omitted.
>>Why are there no other "competitors" in this space? There are. Any language that supports either fastcgi, or runs as an apache plugin (or similar) functions in the "each request starts new" space. There's certainly others, but Python and Perl are both good examples. Starting new with each request does, of course, mean lots of re-work that shouldn't have to be done with each request. It does initially keep complexit…
I mean more of languages that actually "target" this kind of setup. I know it can result in a lot of "extra work", but I really feel like most of the pain of that could be abstracted away by the runtime. Nginx/apache setup a PHP process before the request comes in, so why couldn't you expose that point to your language and let the programming language do work before that point, even "snapshot"ing it to avoid re-doing…
(On my systems, by default there is some reuse of the loaded module, so you can leak state between requests. However it should be possible to avoid reused processes).
Re: Taking PHP Seriously
#86I work on PHP at my day job (in a public company), before this, I came from Ruby, and .NET before that. I'm convinced the reason so many successful projects use PHP, is not because of any inherent nature of the language. I think it's the people who use it. They just don't care. A successful project needs to be started by someone that cares just enough, but not too much. If you're programming in PHP, you're not runnin…
I've been in the game long enough to realize how true this is. Good point. It will certainly make people here defend their sacred choices.
Re: Taking PHP Seriously
#87JavaScript and Python both have systems that allow you to do this: JavaScript has the Google Closure Compiler, and, more recently, TypeScript. Python has a number of projects that use a common syntax [1], including PyChecker.
I say this not to "well, actually" the post, but just to be a gradual typing cheerleader. It's great! We should all be using it! All the time! Please!
Re: Taking PHP Seriously
#88I work on PHP at my day job (in a public company), before this, I came from Ruby, and .NET before that. I'm convinced the reason so many successful projects use PHP, is not because of any inherent nature of the language. I think it's the people who use it. They just don't care. A successful project needs to be started by someone that cares just enough, but not too much. If you're programming in PHP, you're not runnin…
Re: Taking PHP Seriously
#89> First, state. Every web request starts from a completely blank slate.
> Second, concurrency. An individual web request runs in a single PHP thread.
> Finally, the fact that PHP programs operate at a request level
Isn't this just "virtues of Apache modules"?
There's mod_python, mod_perl, and mod_ruby. Are state, concurrency, and global requests virtues of these languages too?
---
Even if you do somehow convince me that these virtues are specific to PHP, you can't convince me it does it well. Hence, MaxRequestsPerChild.
To quote Radmus Lerdorf,
> The real programmers will say "Yeah it works but you're leaking memory everywhere. Perhaps we should fix that." I’ll just restart Apache every 10 requests.
Clean slate, my eye.
Re: Taking PHP Seriously
#90The article points out that arguably the best part of PHP is the "shared nothing lifecycle". That each request starts new, and the process dies at the end of the request. It's by far my favorite part, and I completely agree that it makes "reasoning about" (boy do I hate that phrase...) your program much easier. Why are there no other "competitors" in this space? Why do most other languages go with the alternative rou…
Actually I have never seen that this was a problem in practice with the application server model. I therefore don't think this is a relevant argument.