Ask YC: PHP6?

8 points by jdavid ↗ HN
How do fellow YC'ers feel about the direction of PHP6? "no magic quotes", etc.. is php becoming like every other language?

23 comments

[ 2.1 ms ] story [ 32.8 ms ] thread
"is php becoming like every other language?" Maybe that's for the better. It'd give everyone using the language a nice reprieve from the usual "hurr lawl php kiddie language!" trolls.
but isnt its uniqueness the whole point of the language? i dont know php so dont know what makes it special but from what ive understand its constructed more like chinese than western languages. ie a lot of symbols that do stuff rather than adding a small set of powerful blocks to cronstruct something?

so it is good for fast scripting but poor for real programming?

isnt that the point of the language? i could be way off in my perception of PHP here though.

"so is it good for fast scripting but poor for real programming"

Yes to the first part, and a warning to the last part: What constitutes "real programming" is a question of definition, and here be dragons, as such discussions almost always devolve into "my [favourite] is better than [your favourite]".

There seems to be ample amounts of hatred for PHP here, leading me to believe that either a) people here have never met a GOOD php developer, or b) a minority of users here enjoy the "my favourite scripting language is more obscure than yours" circle-jerk

It seems to me that PHP has trying to be like every other language since it's beginning.
PHP was perl when it started... :)
And Perlmongers reckon it was all downhill from there.
I do not look forward to hunting down and fixing another round of defects in all of our deployed PHP code because they have changed the language for ideological purity.

Code lives longer then their transition periods.

But, thank you for "no magic quotes". I can confidently say that they have only caused me bugs. When our testers try apostrophes in web page input they aren't looking for broken SQL, they are looking for spurious backslashes.

I actually like where PHP6 is headed: http://www.php.net/~derick/meeting-notes.html

There are a couple things I don't agree with. Like adding goto statements. Really? Come on...PHP...

But it seems PHP6 wants to finally remove old deprecated behavior (registered globals/magic quotes/safe mode) which I think is a good thing.

Not to mention namespaces will be a great addition to the language.

At first I had an issue upgrading to PHP5. It didn't have the same speed boost PHP3->PHP4 had, so I didn't see the need to change.

But then I actually looked into the new features.

The OOP improvements, exceptions, SimpleXML and iterator support are all great features I use daily and wouldn't want to move back to PHP4.

I'm also stoked they're finally removing crap like register_globals and magic_quotes. "Safe mode" caused many headaches as well trying to get software running on all possible configurations, adding lots of little restrictions without much real benefit (patching symptoms vs solving the real problem).

IMO they should have done these in PHP5. They already broke b/c with the object system (passing by reference instead of by copying), which was smart but troublesome for any complex OOP code written in PHP4. If you're already breaking b/c badly enough, just tear the band-aid off all at once I say.

PHP programmers + Goto statements? Oh dear lord...

Sorry, I know not all PHP programmers are like that, but still...

They aren't adding 'goto' statements. But they are allowing you to jump to labels with break statements, which is similar.
While slightly different, this creates the same exact problem as goto statements.

Reading/writing code should be linear.

Introducing goto statements allows you to "jump around" inside your code--which is bad form and confusing.

magic quotes were a terrible idea, the first thing my php does is strip and magic quotes if they are enabled

I think namespaces will be a nice addition, and theres a few cases of nice syntactic sugar being done. the icu and xml libraries bundled / enabled looks like a good move as well

There is the PHP language, which is getting better over time, and then there is the PHP userbase, that is permanently retarded.
I think you're being voted down because you've pissed off retarded folks by comparing them to the PHP userbase.
What do you think sets PHP apart from "every other language" which is actually a positive thing?
PHP is going towards where other languages have already tread long ago. I highly recommend anyone considering writing a webapp in PHP think twice about alternative languages, Python in particular.

Perl, Python, Ruby, and ASP.NET are all great webapp languages; but Perl is old, Ruby is heavy, and .NET is Microsoft - however PHP developers have no reason not switch to a real OOP language like Python and save themselves from a wheelbarrow-load of trouble.

How would switching to python help a bad developer? Any good developer will never run into a wheelbarrow-load of trouble.
It wouldn't. But it would make good coding easier for a good developer though. Don't get me wrong - I'm writing a PHP webapp _right now_ on the other monitor... The only reason it's in PHP is because it's a for-redistribution script and everyone knows PHP is easy to deploy and popular.

It has its strengths. They've obviously done something right to garner that huge userbase and support. But for a developer looking to write an internal webapp where only a couple of people get to look at the sort; I maintain that a good developer will be better off coding in one of the other languages that are, shall we just say, more "built" for the hard-core coding sort of thing.