Live data from Hacker News

PHP needs a vision

news.php.net

171–180 of 182 posts

Re: PHP needs a vision

#171

Stas responded here: http://news.php.net/php.internals/64775 "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,…

That vision is stale and cancerous for the PHP community. The directive is and always has been along those lines, "real programmers don't use PHP". For some reason the core team has pushed that. There are a lot of us who use PHP full time who would also love for some real, cohesive decisions to be made in favour of bringing vision to PHP. Sadly the internals list is always just a shitstorm. Anthony's view is that of…

So PHP just has a "potential" to be a "contender" in a world of web languages, but only if it does what you like it to do, otherwise it's hopeless? In what world do you live in? What color is the sky there? In my world, PHP is already one of the leading tools used for web development, and has been there for years.

>>>> The directive is and always has been along those lines, "real programmers don't use PHP". For some reason the core team has pushed that.

This is false, core team never pushed anything like that.

Re: PHP needs a vision

#172

Stas responded here: http://news.php.net/php.internals/64775 "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,…

Nowhere there it says "that a webdev eventually moves on from". It says it should be simple enough to start from. It does not say it is required for it not to be powerful. But when power conflicts with simplicity - we should prefer simplicity, within the bounds of reason of course. I believe we still have very good power - and popularity of PHP so far proves it enough, I think - but we probably won't be able to do some things. Like if you expect full lambda calculus and Haskell-like monads in PHP, it is not likely to happen soon.

>>>> But is the directive really, "Real programmers don't use our language"?

Of course not. How any of the examples given about say any of the people mentioned aren't real? Do you consider real programmer be only guy who writes incomprehensible code in incomprehensible language that does incomprehensible things?

Re: PHP needs a vision

#173
post #149
post #107

Earlier quoted context omitted.

I took a look at that, it appears that you unzip the framework and then start modifying it directly. After you "upload it to your webserver". Deployment? Source Control? No, not in PHP, you just modify shit right on the webserver. I'm sure this process makes upgrading painless, just unzip the framework and... wait... all your changes just got overwritten. This kind of crap is exactly why everyone with a clue laughs a…

No. Everyone knows that you do not modify the framework files. Hell, everyone knew that you do not touch the framework system files years ago with older frameworks like CodeIgniter, so it makes me doubt that you have any experience with PHP frameworks at all. You would upgrade your Laravel framework with composer, which runs on Git. And it'll most likely just work without any "Gem hell" that i've come to experience w…

Yet the framework docs say none of this. Look at rails, it tells you, put your gems in the gemfile.

Laravel says, hack shit directly on your webserver.

If you're supposed to use composer, why don't the docs say this? Instead the docs say, unzip and hack.

Re: PHP needs a vision

#174

Earlier quoted context omitted.

The number of users is not equivalent to quality. It's an indication of quality. As for quality... No, Wal-Mart isn't a purveyor of items with the qualities of being expensive, extremely limited, and old. Quality is a subjective word, defined by different aspects. Just as I can, with justification, define Apple as a purveyor of low-quality hardware, I can say equally it sells high-quality software.

As you say, quality is defined by a number of factors. I'd say that a good, high-level general purpose programming language should be: - coherent - non-verbose - provide solid high-level abstractions - safe - have a solid standard library - optionally, easy to get started with Of all these qualities, PHP is geared toward "ease of access" with a sprinkling of non-verbosity, and fails mostly or totally in the other cat…

> Just like the popularity of the Millenium trilogy does not mean Stieg Larsson can write

Technically, it does. =)

I'm surprised you wouldn't consider the license a language is released under as one of the factors. Or maybe you do, and you forgot to list it. And therein lies the issue: the number of people are indicative of certain qualities, qualities you might not consider important, or might not weigh as highly as other people.

I love erlang, but I'd be hard pressed to use erlang for as many projects as I would like. Not because of failings of the language itself, but because certain qualities it does not possess (ubiquity for one, which affects so many other areas).

Re: PHP needs a vision

#175
post #38

Some of the statements there such as this really disappoint me. "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 a great language in that its very flexible and quick to get going with, the sad thing is people don't want it t…

For some reason, people thing "grow up" means "get the feature I think I need today into the core of the language - pronto!". More features, especially more features picked from here and there without consideration of how it plays with the rest of the language, is not "growing up". PHP is adding tons of features lately, but if the author of some proposal does not get what he wants, and now, he starts preaching to anybody who listens that PHP is resistant to change and never wants to grow up. This is just untrue - PHP has grown up long ago, and doesn't really need to justify itself by seeking constant approval of everybody. There are things that are good for it, and things that are not. Things that are good are going to get in, things that are not would hopefully stay out.

Re: PHP needs a vision

#176
post #5

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. http://news.php.net/php.internals/64771 > The vision has been the same for years. A general purpose scripting > language with a focus on web development. You are simply saying you want > the vision to be more specific than that because everyone…

I think that Rasmus and Anthony seem to have two different thoughts on the word "vision". Anthony was very specific in the fact that his concept of a "vision" is about the paradigms PHP supports: > 1. "PHP Should Strive To Be A Full Featured Object Oriented Language". > 2. "PHP Should Remain A Procedural Language WIth Some OO Features" > 3. "PHP Should Be Implementation Neutral, and Support All Paradigms Equally". Ra…

How using vague terms like "Full Featured Object Oriented Language" is "very specific"? Every OO language out there has different set of features, and the only thing this definition is useful is for bashing opponents over the head with "ah, you don't want this feature? But language X has it, and our vision says we have to be full-featured, so we need to add it no matter what!" Java has checked exceptions? Then PHP should have checked exceptions, otherwise it's not full-featured. And so on. I don't see this as specific vision, but rather as a cart-blanche to abandon reason and consideration. I'm not sure if "specific vision" is possible but using vague undefined terms like "full featured" does not make it specific and it is impossible to reasonably "stick" to it as nobody really knows what it means.

Re: PHP needs a vision

#177
post #173
post #149

Earlier quoted context omitted.

No. Everyone knows that you do not modify the framework files. Hell, everyone knew that you do not touch the framework system files years ago with older frameworks like CodeIgniter, so it makes me doubt that you have any experience with PHP frameworks at all. You would upgrade your Laravel framework with composer, which runs on Git. And it'll most likely just work without any "Gem hell" that i've come to experience w…

Yet the framework docs say none of this. Look at rails, it tells you, put your gems in the gemfile. Laravel says, hack shit directly on your webserver. If you're supposed to use composer, why don't the docs say this? Instead the docs say, unzip and hack.

The docs don't say that you would update the framework via composer (though this may change when Laravel 4 is released) but they do say that you should just replace the "laravel" folder with a new version using whatever method suits you best, which can be even easier. It certainly seems easier than upgrading Rails, since then you can update your whole remote application code and framework in a single push.

The docs clearly explain that your bundles go to the "bundles" directory, controllers go to the "controllers" directory, views belong in "views" and so on. And your whole application resides in a directory called... "application". You'd actually have to be pretty advanced and amazingly stupid at the same time to make a functional app in the framework core folder and than destroy it by overwriting.

Rails docs don't tell me to unzip the framework and start hacking, but they do instruct me to run "gem install rails", wait a couple of hours till it's done, then run "rails new blog", "cd blog" and then start hacking. Neither set of docs tell me how to setup version control before i begin my work, and they shouldn't. That's not the job of the framework docs.

And of course you're gonna hack your application directly on the server, albeit a local one, as PHP applications are typically developed. This in no way prevents you from using version control and proper deployment techniques.

Re: PHP needs a vision

#178

Earlier quoted context omitted.

If number of users was equivalent to quality you would be correct. But it isn't. Under your argument, Wal-Mart is a purveyor of family heirlooms.

The number of users is not equivalent to quality. It's an indication of quality. As for quality... No, Wal-Mart isn't a purveyor of items with the qualities of being expensive, extremely limited, and old. Quality is a subjective word, defined by different aspects. Just as I can, with justification, define Apple as a purveyor of low-quality hardware, I can say equally it sells high-quality software.

It's not even an indication of quality, it's an indication that many people use it.

I guess you can quibble about definitions all day if you like, and you can take "family heirlooms" literally instead of metaphorically as it was intended, but that won't make Wal-Mart a seller of quality items nor will it make PHP a well-designed language under any sort of definition that is relevant to reality.

And, honestly, if the only thing we're going to argue about is whether or not quantity equals/implies quality and the definition of "quality", the argument against PHP has already won.

Re: PHP needs a vision

#179
post #165

Earlier quoted context omitted.

I can't agree with that. Personally I happen to use PHP not for web development, but almost exclusively for system administration and monitoring (I'm not a web developer). It's very comfortable using PHP in these areas, as: - PHP and many of the PHP extensions are packaged for about every major OS and architecture - a lot of functionality is already shipped with the interpreter (so no additional stuff necessary) - it…

Deployment is "easy" because you just copy a bunch of files, right? Reproducible deployment takes a little more effort, but it's well worth it when the time comes to upgrade a server, or a pipe bursts on top of your existing one. Python has your other advantages, quite a lot of existing monitoring software, and is a far more pleasant language to program in.

Well, you could just copy a bunch of files, if that's all you need to do. But ideally you'd use a tool like Fabric to do your copying/moving, symlinking, server config changes, etc.

We use Python for a number of things too (and yes, I like the language a lot). The only trouble I have with Python in this context is actually cross platform support. It's a bit harder to get packages for the latest and greatest versions of modules and the interpreter if you have to deploy to e.g. Solaris 9 systems, unless you create them yourself. Theoretically it should have the same advantages, yes.

Re: PHP needs a vision

#180
PHP would do well getting proper weak references in play, regardless of vision. No easy task at this point, sadly :(

More specifically: Put in proper weak refs -> get lexical scoping -> get first class functions.

Post reply on HN