

Ask YC: PHP6? - jdavid

How do fellow YC'ers feel about the direction of PHP6?  "no magic quotes", etc.. is php becoming like every other language?
======
Jasber
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.

~~~
Maascamp
They aren't adding 'goto' statements. But they are allowing you to jump to
labels with break statements, which is similar.

~~~
Jasber
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.

~~~
SwellJoe
If goto is good enough for Linus, it's good enough for me.

<http://kerneltrap.org/node/553/2131>

Then again, I don't imagine there are many Linus-caliber developers working in
PHP. This could get ugly.

------
slater
"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.

~~~
schtog
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.

~~~
slater
"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

------
jws
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.

------
andrewf
What do you think sets PHP apart from "every other language" which is actually
a positive thing?

------
art_wells
It seems to me that PHP has trying to be like every other language since it's
beginning.

~~~
j2d2
PHP _was_ perl when it started... :)

~~~
SwellJoe
And Perlmongers reckon it was all downhill from there.

------
ComputerGuru
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.

~~~
Maascamp
How would switching to python help a bad developer? Any good developer will
never run into a wheelbarrow-load of trouble.

~~~
ComputerGuru
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.

------
daleharvey
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

------
henning
There is the PHP language, which is getting better over time, and then there
is the PHP userbase, that is permanently retarded.

~~~
SwellJoe
I think you're being voted down because you've pissed off retarded folks by
comparing them to the PHP userbase.

