News for hackers. Stuff that matters.
Re:PHP needs a vision by venomsnake on Wednesday January 09, 2013 @08:49PM (#5034807)
The problem with php is that is scales terribly with the size of the codebase. Try to move away from the comfort zone of the language and the size of the project and it changes a lot.
Re:PHP needs a vision by Sander_Marechal on Thursday January 10, 2013 @12:50AM (#5035687)
The opposite, actually. PHP's shared-nothing architecture makes scaling a breeze. Just add more hardware.
Re:PHP needs a vision by mercurial on Thursday January 10, 2013 @09:28AM (#5036981)
I believe you misread parent. The size of the codebase has little to do with the resources needed by the software.
Re:PHP needs a vision by michael_miller on Wednesday January 09, 2013 @08:51PM (#5034818)
If this is the case, then maybe PHP's role is a rapid prototyping language which is replaced when the codebase gets to a certain size.
Re:PHP needs a vision by fleitz on Wednesday January 09, 2013 @08:54PM (#5034830)
Generally that size is not more than about 5 files.
Re:PHP needs a vision by icelancer on Wednesday January 09, 2013 @08:58PM (#5034845)
Yeah good one. Wordpress is a great example of a huge failure written in PHP over 5 files, right?
Re:PHP needs a vision by flyosity on Wednesday January 09, 2013 @09:13PM (#5034922)
The codebase of Wordpress is an utterly terrible, offensive, kludgy, hacked-together mess of spaghetti code. The last time I looked at the internals it still lacked a coherent MVC structure. There are big, good things built with PHP, written the right way with solid software engineering principles, but Wordpress is not one of them.
Re:PHP needs a vision by icelancer on Thursday January 10, 2013 @01:21AM (#5035775)
Yeah, it's very evident in the fact that no one uses it, too. PHP sucks.
Re:PHP needs a vision by krichman on Thursday January 10, 2013 @05:22AM (#5036267)
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.
Re:PHP needs a vision by jasonlotito on Thursday January 10, 2013 @09:08AM (#5036885)
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.

Re:PHP needs a vision by mercurial on Thursday January 10, 2013 @09:49AM (#5037083)
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 categories. Just like the popularity of the Millenium trilogy does not mean Stieg Larsson can write, the popularity of PHP is more an indication of its low barrier to entry (especially combined with widespread hosting support) than anything else.

Re:PHP needs a vision by jasonlotito on Thursday January 10, 2013 @03:50PM (#5039652)
> 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 by krichman on Thursday January 10, 2013 @09:29PM (#5041024)
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 by jessedhillon on Wednesday January 09, 2013 @09:05PM (#5034878)
Yes, it is a "good one." Wordpress' source looks like spaghetti with shit sauce. The fact that it runs is a testament to something, but not the readability, maintainability, or usability of the code base. Those people wouldn't know a well-designed API if, well, fill in the rest here.
Re:PHP needs a vision by icelancer on Thursday January 10, 2013 @01:22AM (#5035776)
Good point. Must be why no one uses it.
Re:PHP needs a vision by jessedhillon on Thursday January 10, 2013 @01:47AM (#5035843)
Whatever else you are, you're not too stupid to see what's wrong with this argument. So the fact that you're forwarding it anyway means you can't make a real point, or you are trolling.
Re:PHP needs a vision by twodayslate on Wednesday January 09, 2013 @10:34PM (#5035216)
Re:PHP needs a vision by davidlumley on Thursday January 10, 2013 @01:45AM (#5035832)
Facebook _doesn't_ run PHP. A large portion of it is coded in PHP, but it runs C++ through HipHop[1]. Facebook may as well be written in anything that compiles down to C++.

1: http://en.wikipedia.org/wiki/HipHop_for_PHP

Re:PHP needs a vision by memla on Thursday January 10, 2013 @08:25AM (#5036696)
Actually, the difference between compiled C++ code, and the newest version of PHP with APC/Xcache is not that drastic, but facebook needs to squeeze out every bit of performance so they can to cut down on the number of servers.

For what it's worth, PHP 5.4(without APC) performed better than both Python and Ruby on that language shootout page: http://benchmarksgame.alioth.debian.org/u64/which-programs-a...

Re:PHP needs a vision by anu_gupta on Thursday January 10, 2013 @08:17AM (#5036672)
By that standard, anything may as well be written in a language that eventually results in machine code being executed.
Re:PHP needs a vision by Joeri on Thursday January 10, 2013 @02:48AM (#5035983)
Actually, facebook is moving to a JIT model and getting better performance out of it than the crosscompiled code.

http://arstechnica.com/business/2011/12/facebook-looks-to-fi...