Live data from Hacker News

Taking PHP Seriously [pdf]

raw.github.com

1–10 of 155 posts

Re: Taking PHP Seriously [pdf]

#2
Adams actually makes some very valid arguments in this PDF. People like to argue the superiority of languages, but at the end of the day if the result in PHP is the same as it is in Ruby & Rails, Java, .NET or whatever, does it really make what the language is? Another good point is the efficiency of a developer working in PHP. The language is easy, it's so easy to be a PHP master after a few years working in the language. It's easy to find super-talented PHP developers compared to any other language.

I like the idea of opt-in typing for PHP via Hack which you can enter by beginning your PHP code with PHP isn't going anywhere. It might be one of the oldest web languages, but I think the PHP space is starting to get better with Facebook's contributions to the language, Laravel 4 being a solid PHP framework and we can't forget that most Yahoo! products are built using PHP as well (even the recently acquired Tumblr is coded in PHP). Flickr! is probably one of their biggest PHP applications.

Event hough Facebook appear to have resolved the many complaints and problems of PHP, I am sure people will still find a way to complain about the language that powers most of the web...

Re: Taking PHP Seriously [pdf]

#4
This was an interesting talk. My own interpretation was that PHP's strengths were claimed to be:

1) State => because endpoints have no persistent state

2) Concurrency => because there is no concurrency model

3) Transparency => (1) + (2) + fast reload = easy to understand

These combined give the language nice programmer "ergonomics" (Keith's terminology). It also limits the collateral damage any particular change to the codebase can have which allows Facebook to more confidently deploy multiple times a week.

Re: Taking PHP Seriously [pdf]

#5
I've used php since v3, in its non-OO days. Coming from perl, that fit nicely. Today, I still avoid OOPHP and continue to write procedurally. The convenience of web-oriented functionality, broad deployment, and soft typing is basically unparalleled, although writing this way requires a bit of discipline. It's also a surprisingly good fit for a lot of server side code if you scale beyond a merely web-based execution model and have existing libraries. These days, I generally avoid perl if data structures are required, and despite dabbling RoR-esque frameworks feel overly constraining with regards to execution path control: I don't want a controller and additional layers of abstraction, the web server does that already!

Re: Taking PHP Seriously [pdf]

#6

Adams actually makes some very valid arguments in this PDF. People like to argue the superiority of languages, but at the end of the day if the result in PHP is the same as it is in Ruby & Rails, Java, .NET or whatever, does it really make what the language is? Another good point is the efficiency of a developer working in PHP. The language is easy, it's so easy to be a PHP master after a few years working in the lan…

Are the complaints about PHP even controversial? The built in library functions are a mess, and mostly terrible. The syntax and basic language are overly verbose and have layers upon layers of cruft. The type and object systems are grafted on, and have so many gotchas and inconsistencies that it takes many months to understand enough of them to be very productive in the language. The aspects of PHP that were intended to make it simple (like pretending types don't exist) actually make it more difficult to reason about precisely. I don't think anyone who knows anything else would ever choose PHP for a fun personal project.

Despite this, there is nothing in PHP that prevents you from doing the thing you want to do, however you want to do it. As projects become larger and involve more time and people, the fine grain of line syntax fades out of view, and all that is left is the large scale design decisions, which are similar in any language. And this is what ultimately determines the technical success or failure of software.

Re: Taking PHP Seriously [pdf]

#7
post #3

obligatory X is better than php flames on the way.. php just works.. end of story

PHP just works... if you're willing to spend more time on it, find more bugs in production, have a less readable, extensible, and maintainable codebase, and have no taste.

PHP is the dream of a one-man team that gets paid by the hour. Get contract, slap something together that makes the client willing to pay, throw it all away and do it again when the client wants a change.

Re: Taking PHP Seriously [pdf]

#9
post #6

Adams actually makes some very valid arguments in this PDF. People like to argue the superiority of languages, but at the end of the day if the result in PHP is the same as it is in Ruby & Rails, Java, .NET or whatever, does it really make what the language is? Another good point is the efficiency of a developer working in PHP. The language is easy, it's so easy to be a PHP master after a few years working in the lan…

Are the complaints about PHP even controversial? The built in library functions are a mess, and mostly terrible. The syntax and basic language are overly verbose and have layers upon layers of cruft. The type and object systems are grafted on, and have so many gotchas and inconsistencies that it takes many months to understand enough of them to be very productive in the language. The aspects of PHP that were intended…

I think it's exceptionally easy to become productive in PHP quickly and to reason about the code despite all the warts and gotchas. The good points about PHP raised in the slides (statelessness, etc.) hugely simplify thinking about code, offsetting the bad stuff and then some.

Doesn't make me want to give up python or node, but these are strong points in PHP's favor.

Re: Taking PHP Seriously [pdf]

#10
post #6

Adams actually makes some very valid arguments in this PDF. People like to argue the superiority of languages, but at the end of the day if the result in PHP is the same as it is in Ruby & Rails, Java, .NET or whatever, does it really make what the language is? Another good point is the efficiency of a developer working in PHP. The language is easy, it's so easy to be a PHP master after a few years working in the lan…

Are the complaints about PHP even controversial? The built in library functions are a mess, and mostly terrible. The syntax and basic language are overly verbose and have layers upon layers of cruft. The type and object systems are grafted on, and have so many gotchas and inconsistencies that it takes many months to understand enough of them to be very productive in the language. The aspects of PHP that were intended…

> I don't think anyone who knows anything else would ever choose PHP for a fun personal project.

I would. For every job, a proper tool. If my project is client-side heavy and only needs a thin layer between the client-side and the database, I'll pick PHP. The code I would write in PHP would be minimal and I would get it up and running very quickly.

If I'm writing something substantial on the server-side, then yeah, you may want to consider something else.

Post reply on HN