TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

PHP needs a vision

179 pointsby dave1010ukover 12 years ago

24 comments

h2sover 12 years ago
That closing appeal to deal with the abusiveness of the php.internals list fell a little flat given the opening statement of "shut up". I loved Rasmus' answer to this though.<p><a href="http://news.php.net/php.internals/64771" rel="nofollow">http://news.php.net/php.internals/64771</a><p><pre><code> &#62; The vision has been the same for years. A general purpose scripting &#62; language with a focus on web development. You are simply saying you want &#62; the vision to be more specific than that because everyone has a &#62; different view of what web development means. But even if we narrow the &#62; vision, it will still be open to a lot interpretation. We try to strike &#62; a balance between the different and changing views of web development &#62; the same way we strike a balance between appealing to weekend warriors &#62; and top-100 trafficed sites. No vision statement is going to answer the &#62; question of whether annotations should be in docblocks or in the core &#62; language. That's simply not what vision statements do. &#62; &#62; -Rasmus </code></pre> Maintaining clarity of purpose in a project can be difficult sometimes. Kudos to Rasmus for managing to do so in the midst of what looks like it's gearing up to be another php.internals shitstorm.
评论 #5034219 未加载
评论 #5034328 未加载
kjackson2012over 12 years ago
I come from a C++ background, and early last year tried my hand at web development.<p>After hearing about all the stuff about how PHP was an "old", kludgey language, I tried to learn python, and go the webpy. It was doable, but I kept running into issues all the time.<p>I gave up and switched to PHP, and I have to say that it was a much easier experience. For the most part, everything just worked. Regardless of how kludgey its history is, how inconsistent the syntax is, etc, it really does work well. I'm now doing PHP development at my current job and it's been fine.<p>One thing I learned from a previous job was the saying "Your customers don't care about your technology. They care about you solving their problems." If you are solving their problems, they will pay you, regardless of whether or not your back-end is CGI, perl, PHP, or whatever.
评论 #5035454 未加载
评论 #5034843 未加载
评论 #5034824 未加载
评论 #5034807 未加载
评论 #5036476 未加载
评论 #5036516 未加载
saraid216over 12 years ago
Stas responded here: <a href="http://news.php.net/php.internals/64775" rel="nofollow">http://news.php.net/php.internals/64775</a><p>"PHP's vision is being simple and practical and focused on the web. PHP is what people use to get their first site off the ground. PHP is what a web designer learns when he/she wants to go into programming. PHP is what a random Joe uses when he needs to whip up a page and he's in "do it yourself" mind. PHP is what you expect everybody to be able to handle, and everything to be able to run. It is not to serve everybody, every use case and every possible need."<p>Frankly, I don't understand this vision at all. Is PHP supposed to be a beginner's language that a webdev eventually moves on from? I mean, don't get me wrong: I used PHP for exactly that when I graduated from high school. But is the directive really, "Real programmers don't use our language"?
评论 #5034365 未加载
评论 #5034158 未加载
评论 #5039419 未加载
ciesover 12 years ago
Too late if you ask me, let me explain:<p>Programming languages are hard to change, very hard, because it will certainly break programs written in it in many places. So if you want a programming language with a vision you should start with it, or simply accept it has no vision and it merely goes with the whim of its maintainers. The latter is what I believe happened to PHP. No biggy, there are plenty of languages that do have strong visions and are very suitable for web-development; just move on.<p>If PHP was to implement a vision, it would soon not be PHP anymore, whether that is a good thing is up to the users of that language. In that case I foretell a hack of a lot of porting effort and a fork (facebook?)... :)
评论 #5034350 未加载
phatbyteover 12 years ago
Personally I think PHP has a bad rap for two reasons:<p>First: Community like HN and such, have lot of good and smart people, however, lots of us are what I like to call "tech hipster", they like to always brag about how they prefer some new-shiny language/framework whatever, as if that means they know more than the average developer. Like an hipster when it comes to some underground-indie-band.<p>It's pretty fun to see this, I laugh quite a lot TBH. And because of this PHP is looked upon as a mainstream language, like POP music, always number one on the charts, always on the frontpages, but like POP it lacks quality, good taste and so on (what some people think at least).<p>So, many of us, just hate PHP cause it's POP and using a POP language is cheesy and lame...whatever...and they just hate PHP because they read someone else's saying it sucks. eg: "PHP sucks, because I use X"<p>Second reason: Other people on the other hand, have really fundamental reasons to dislike PHP, however, I noticed that a lot of these people haven't used PHP since version 4, and they are completely out of the current state of PHP. I don't mean everyone, but most of them do.<p>I'm not a PHP fan or anything, in my work I have to use it, although I really wish I could use Python, but I can't. So, instead I try my best to use it in the best way I can.<p>I'm currently using Symfony2 framework, which brings a lot of good web dev practices into PHP world. I'm looking at Laravel as well.<p>To be, most people still think PHP developers use a PHP as a single file where they put PHP function on the top tof the file and html at the bottom and such...and if you a good developer you can really make PHP shine these days, because there a good tools and frameworks out there.
评论 #5036756 未加载
jfaucettover 12 years ago
I couldn't agree more, and I'm a fan of PHP. It's a swiss army knife of a language, allowing you to program however you want. C programmers can code procedurally and java guys can jump in and basically go all out with the OOP constructs provided. I've watched PHP get better over the years, and it continually does so, but after having switched recently to Ruby, I have to say a solid "Benevolent Dictator" would probably not be such a bad thing for the language. Ruby has its paradigms, its own way of doing things, and you frankly can't develop software in many ways PHP allows you to, but for me Ruby is still a much more succint and beautiful lang, one I enjoy programming in more, I think partially because it has this, a set way of thinking about software design. I mean unit tests are in the stdlib for example, and you can't program long in the language without using utils, gems, etc, that all are chalk full of test suits that pass.<p>IMHO, a programming language should not just focus on itself or whether it has such and such feature, but on how it can be used in the entire software development cycle. This is something Go and Ruby are doing exceptionally well, and is why I like using them so much to build software, whether its web or otherwise. Probably because of its history as a template language embedded into HTML (way back when :), PHP has still got some growing pains in order to build up its software development paradigms, but I'm still hopefull, it has gone amazingly far and continues to improve.
nnqover 12 years ago
PHP has never been about the "language" as far as I see (hell, it was a templating system "evolved into a language"!), but about the platform (language + libraries + server + tools and what this meant for deployment and scaling).<p>PHP (the LAMP "web development platform" that happens to include the PHP language) got so popular because:<p>1. ease of deployment<p>2. ease of scaling<p>3! KISS by <i>keeping the layers of abstraction few and thin</i> (at first it was just a thin "templating" layer to reach the functions in C libs)<p>Only (3) has anything to do with the language itself, and is the only one the could translate to a language "vision". If PHP were to remain true to itself and its advantages that made it what it is today, their vision can only be <i>to keep the layer of abstractions few and thin</i> and this can only mean 2 and 3 from the OPs rant: procedural, functional and multi-paradigm enough to support OO (I know, people don't write functional code in PHP but I think they should - it really helps with KISS once you go over the "procedural brain rot").<p>P.S. As a developer I <i>hate</i> PHP (viscerally, passionately, religiously and in all other ways imaginable)! As a manager I absolutely love the "fail cheap, fail fast" philosophy and PHP is one of the few languages that enables this "flow".
dirkthemanover 12 years ago
Wow. I must say I'm surprised (not in a good way!) by the lack of quality of a number of the comments here. I already knew that PHP isn't the language of choice of cool programmers, but at least they make some sort of informed decision. Some of the comments here ("PHP must die!" and "I use Rails" or "I switched to JavaScipt") really show a lack of understanding about even the most basic concepts of PHP, or programming in general.<p>I'm the first one to admit that PHP has its flaws, but that's not to say that other languages are perfect, or 'better'. PHP is a Frankenstein's monster, and no matter the quality of body parts you schlep onto it, it will probably still work. Ruby on the other hand is stricter, more consistent. If you're new to programming you can hit the ground running with Ruby (especially with the Rails framework, but if you're new to programming, would you even know how a framework relates to a programming language?). But if you want to go beyond a simple CRUD-app, Ruby poses a lot of challenges that can be hard to solve whereas PHP, well, just works.<p>My point is: you pick the right tool for the right job. For a lot of people, the right tool is PHP because it's the only thing they know. That's not PHP's fault, now is it? This kind of thinking reminds me of the clash between Apple fanboys and Fandroids: to each their merits, but you can't seriously state the one's perfect and the other one is utter rubbish.<p>Wether you like PHP or not, it's still: a) the most popular programming language b) the programming language with the most job openings (Source: <a href="http://www.udemy.com/blog/modern-language-wars/" rel="nofollow">http://www.udemy.com/blog/modern-language-wars/</a>) This has to count for something, right?<p>So please, for the sake of keeping HN a decent place, refrain from using non-argumented statements like 'PHP must die'. You're not adding anything to the discussion and you make yourself look like a fool.<p>As for the 'vision of PHP': I'm glad there is none. It's the gateway drug to a lot of programmers, and I'm sure that I would have given up on programming if it weren't for PHP. When I look back on some of the stuff I wrote some 10 years ago I just want to cry, but that does show that I've grown as a programmer. It's perfectly possible for people to start out with PHP and evolve to good programmers, regardless of language used. A stricter defined PHP would just kill that.
评论 #5037110 未加载
blantonlover 12 years ago
I think PHP (5.x/6x) is still applicable to any developer, new or old, experienced or not. Many of us cut our teeth on PHP's simple scripting concepts, and that shouldn't change. And from what I've seen from past history, it won't.<p>There is a tremendous amount of backwards compatibility in current versions of PHP that allows one to follow the same approach to Web development that those did back 10-15 years ago with PHP 4. No, it is not "Enterprise", and yes there are security considerations to account for. But the process of adoption is key, and PHP continues to be adopted by a lot of startups/projects. Those that choose to adopt the PHP language as their advanced vernacular moving forward still continue to have a number of more advanced programming language concepts to utilize in PHP with each new release, with barely any breakage with other approaches to using PHP.
评论 #5034850 未加载
programminggeekover 12 years ago
PHP is for webdev. That's it. Go outside the bounds of that and it loses its magic. On its own it's great for spitting out a webpage. It's a scripting and templating language in one, which is kind of cool.<p>That said, outside of that to make PHP work on bigger projects you end up with a lot of structure and ceremony that make PHP suck, not quite as much as Java, but it's not amazing.<p>Thiings like testing and testability aren't much fun in PHP. For a long time package management was a joke.<p>PHP is for webdev. That's it.
评论 #5036079 未加载
评论 #5035979 未加载
kammeover 12 years ago
Whenever this issue pops up I always imagine Fabien Potencier (while he's no dictator, he has a very clear path) taking over the php source and change it according to his vision. Then I imagine going back to the first php script I ever wrote and how if I would have been able to create it with the changes. I can honestly say I can imagine it would have been a lot harder to do and there is a big chance that I would have given up because I can imagine him going into full OO mode. Don't think I don't like Fabien, for me personally his php version would probably be a lot better, but also a lot harder for new users.<p>This is one of the best things of php: it's easy enough for new developers and you can grow into the OO aspects of it. While I must admit I would also like a big cleanup to make the function names and arguments more uniform, I don't hope they change anything that makes it harder to begin with php or limit the possibilities to grow.
vereloover 12 years ago
Some of the statements there such as this really disappoint me.<p>"PHP is what people use to get their first site off the ground. PHP is what a web designer learns when he/she wants to go into programming. PHP is what a random Joe uses when he needs to whip up a page and he's in "do it yourself" mind."<p>PHP is a great language in that its very flexible and quick to get going with, the sad thing is people don't want it to grow up...after all, so many massive companies (FB?) use PHP for core components. Why can't those internally have a slightly larger vision...
评论 #5034695 未加载
评论 #5040253 未加载
fleitzover 12 years ago
It has lots of vision, what it needs is a janitor.
venomsnakeover 12 years ago
You want a vision? Here is one - make the mess we have at the moment work.<p>I write in php for the better part of 4 years now and hate it every day. And I have written in c++ before that. Ask 20000 developers what are their main pain grievances sort them by "popularity" and just remove them one by one.<p>For me it is the hard debugging, the include mess and the "extremely" creative ways parsing and runtime errors are communicated to the developers.
评论 #5034882 未加载
评论 #5036599 未加载
评论 #5034884 未加载
评论 #5034883 未加载
polemicover 12 years ago
Worthwhile reading the email that preceded it:<p><a href="http://news.php.net/php.internals/64763" rel="nofollow">http://news.php.net/php.internals/64763</a><p>The response hardly seems warranted. The vision is pretty stated there.
评论 #5034909 未加载
TazeTSchnitzelover 12 years ago
php's internals mailing list is chaos. It's a pantomime of "YES-NO-YES-NO-YES-NO" ad nauseum. And that is why PHP is such a horrible, inconsistent language. It has never had any consistent direction. JS was bad at first, but its mistakes are slowly being corrected and it is become more consistent and coherent. PHP was bad at first, and they keep breaking things as well as improving it.
olleicuaover 12 years ago
I think this may be too optimistic. It seems to me that PHP's lack of vision has already made it a horrifically bad language. The problem is not that it tries to do OO while also not really trying to do OO (don't get me wrong though, that is a problem). The problem is that it tries to do OO like Java. Get with the times and learn Ruby already.
评论 #5035088 未加载
bunwichover 12 years ago
I have $20. $10 to two PHP BDFL's kickstarters that are willing to take on the responsibilty of improving the language and removing the inconsistencies.<p>1) No one from Zend or Rasmus can apply. 2) facebook - would love if you guys forked it, but you don't need my money.
TheEmpathover 12 years ago
PHP would do well getting proper weak references in play, regardless of vision. No easy task at this point, sadly :(<p>More specifically: Put in proper weak refs -&#62; get lexical scoping -&#62; get first class functions.
评论 #5045497 未加载
rmorizover 12 years ago
They should hire DHH for 10.000$/day. I'm sure he can help.
评论 #5036452 未加载
jahitrover 12 years ago
Switched PHP for JS. Never looked back.<p>Seriously, It needs to die.
评论 #5036045 未加载
towskiover 12 years ago
So does Perl
nunbotover 12 years ago
it needs a relapse. dont do shit because its popular, do it because its useful!
Tichyover 12 years ago
PHP needs to die<p>Sorry...
评论 #5034143 未加载
评论 #5034228 未加载
评论 #5035765 未加载
评论 #5034395 未加载