9 ms·
Anyone who has had to work on a single system for many years may be interested (even entertained) by this talk. One thing I appreciated about the video was how
by Vanderson 7y ago
Anyone who has had to work on a single system for many years may be interested (even entertained) by this talk.
One thing I appreciated about the video was how one of the biggest complaints against PHP isn't quite accurate: Inconsistencies of needle/haystack parameter order in functions. (there is a consistency there, but I didn't know it)
And the fact that PHP was developed over time and in dramatically different eras of the internet that heavily influenced it's features. He admits where mistakes were made, but also where people misunderstood the source/reasoning behind some of the decisions in PHP. (though he seems to sidestep some of them completely)
Magic quotes, globals, register globals, etc... he has really good reasons for why and how these things came about. I found this talk fascinating, especially since I build a system that has morphed over time as well.
- nkozyra 7y agoA lot of these things came about because they allowed people to bypass harder aspects of programming for the web. This was great for ease of entry but introduced tons of problems.
- Vanderson 7y agoI think it's a little unfair to not refer to his responses to these allegations in the video. He never intended PHP to last longer than 6 months. He kept waiting for someone to make something better so he could shut it down... it just didn't happen. Also, he admits he's not a great programmer. As a counter point doesn't every language "introduce problems" of some kind?
- nkozyra 7y agoAgain, I don't think this is his fault in this regard. I also think he's humble about his capabilities and I'm sure this long project matured his chops across the board. But a lot of the choices were short sighted, and a devotion to backwards compatibility has limited the ability to clean up. PHP is now a super fast, relatively mature web programming language that carries a lot of its baggage.
- Vanderson 7y agoI'd really recommend you watch the video to understand how long term development of a hugely popular system isn't as easy as it may seem. Especially if the environment is as dynamic as the internet. He addresses your issues about "short sighted" choices and backwards compatibility.
- nkozyra 7y agoI had watched it and comments like yours are generally frowned upon here. > Please don't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that."
- Vanderson 7y agoSorry, I forgot about that rule. I really wasn't being critical of you not watching it. (There is no tone in writing to convey that extra meaning.) I was trying to suggest it as a helpful way to understand Rasmus' perspective and a very complex history of development that has real logic to the choices he made that so many people have been critical of over the years. And that I think if someone heard him out would realize they would likely have made the same choices he did if they were in the same situation. I just felt there wasn't a need for me to quote the video, but I suppose that was a little lazy of me.
- ptx 7y agoThe video was interesting and he comes across as a very reasonable and pragmatic guy who had good reasons for designing it the way he did. But those reasons and that design resulted in a not very excellent language - as the parent post (and Rasmus himself!) said. Convenient but problematic, intended to be replaced by something better. That said, the improvements in version 7 look impressive. I still prefer a language that's not quite as ugly though.
- simion314 7y agoI was not on the internet at that time, were there better alternatives?
- edoceo 7y agoMS-ASP or CGI. 20 years ago PHP was like "amazing", compared to what else was around. Maybe ColdFusion
- toyg 7y agoColdFusion was terribly expensive, like all the other stuff like WebObjects or Netscape. The Microsoft stuff was expensive AND insecure. CGI (i.e. Perl) was cheap but annoying to learn, setup, and maintain. Java was sluggish and unusable in shared-host environments (i.e. expensive, again). PHP hit an optimum equilibrium between usability, features, and price. This only changed when virtualization changed the hosting game. Arguably PHP is still very close in terms of usability - deployment is fundamentally trivial - it's just lagging elsewhere.
- antod 7y agoYup, those were the two web "stacks" I had tried before PHP - around 1999 or so. At the time PHP did feel amazing compared to Classic ASP in VBScript (shudder), and I never really felt comfortable with Perl. There were other things like Zope and Roxen/Pike around back then, but I never used them. Ah and OpenACS/AOLServer which was TCL from memory.
- thaumaturgy 7y agoI was a maturing young programmer back then. The leading alternative was Perl, which was still pretty lively but had a lot of the same complaints at the time that it does now (readability). Perl's what I was primarily using; it took me a bit to adopt PHP, but once I did, I never looked back. Some folks were also compiling C and gluing it together with a CGI module, and a lot of others in the Microsoft world were using Frontpage and its brethren. But, the Microsoft stack only ran on Windows servers, and Windows web servers had a reputation (deserved, imo) for kinda sucking. PHP's killer feature was mod_php. It was dead simple to integrate into any shared hosting environment, and so pretty much every shared host did. mod_php magically knew how to spit out html when reading html, and execute php when encountering php tags, so that gave us the html-mixed-with-php pattern that was wonderful at the time but considered bad practice now. But also scope has changed a lot. At the time, people were mostly looking for hit counters, contact forms, and "guestbook" forms. For all those things, PHP excelled, so it gobbled up the market fast.
- Crazyontap 7y agoSorry I haven't watched the video (don't have headphones) but I can understand why php changes the order or function params sometimes like array_filter wants the array first and callback second and array_map wants it in reverse. But if you think about it array_filter expects an array first and function second because the callback is optional and it compares to false if left out. OTOH with array_map there is only one function callback and there can be N number of arrays so the function needs to be the first and the arrays second. It makes perfect sense to me but for a lot of people it may look like inconsistencies.
- viraptor 7y agoIt's not an either/or. Those signatures are inconsistent and there's a reason they were made that way. It could be done another way. (detecting the type of parameters or having a different name for the callback version)
- kristopolous 7y agoWhy not just let the type system figure it out in this instance?
- tpetry 7y agoBecause php has no function overloading by type system.
- kristopolous 7y agoThe type can trivially be checked inside the function. You don't need type system function overloading
- totony 7y agobut this has runtime cost, where inconsistent order doesn't
- lucb1e 7y ago> One thing I appreciated about the video was how one of the biggest complaints against PHP isn't quite accurate: Inconsistencies of needle/haystack parameter order in functions. (there is a consistency there, but I didn't know it) For those who are interested, this is around 24:25: https://youtu.be/wCZ5TJCBWMg?t=1465 https://youtu.be/wCZ5TJCBWMg?t=1465