Live data from Hacker News

What to Look For in PHP 5.4

jburrows.wordpress.com

41–50 of 67 posts

Re: What to Look For in PHP 5.4

#41

Link didn't work for me, but http://jburrows.wordpress.com/2011/12/05/what-to-look-for-in... did. Not sure why the date would have changed to earlier.

I think this may have been posted prematurely. Even in the version you linked to, it seems like part of the traits example has been cut off.

Re: What to Look For in PHP 5.4

#42
post #29

Earlier quoted context omitted.

What do you mean lately? PHP has gotten tons of well deserved criticism since it was created. It isn't "hate" to point out that a popular language is much worse than many other comparable languages.

It becomes "hate" when the criticism is ill-informed and largely irrelevant. The bits of PHP that are "much worse" are mostly either legacy cruft that nobody in their right mind uses anymore, or bits are rarely touched in day to day programming but are safely wrapped in frameworks, ORM's, libraries etcetera. Beyond that, PHP simply isn't particularly elegant (mostly since it was never really designed to be a programm…

[deleted]

Re: What to Look For in PHP 5.4

#43
post #29

Earlier quoted context omitted.

What do you mean lately? PHP has gotten tons of well deserved criticism since it was created. It isn't "hate" to point out that a popular language is much worse than many other comparable languages.

It becomes "hate" when the criticism is ill-informed and largely irrelevant. The bits of PHP that are "much worse" are mostly either legacy cruft that nobody in their right mind uses anymore, or bits are rarely touched in day to day programming but are safely wrapped in frameworks, ORM's, libraries etcetera. Beyond that, PHP simply isn't particularly elegant (mostly since it was never really designed to be a programm…

> The bits of PHP that are "much worse" are mostly either legacy cruft that nobody in their right mind uses anymore

Ever dealt with PHP code in the wild before? The amount of PHP written by people not in their right mind is VERY high.

Re: What to Look For in PHP 5.4

#44
post #5

It's been a long time since I had any interest at all in PHP, and these new features make me feel uneasy once again. The development server seems like the only good thing about it. Traits looks like a silly implementation of multiple inheritance mixins, with a 'use' keyword that doesn't really fit in with the language itself. And the whole 'insteadof' thing looks weird. It will lead to hackish code for many people, e…

* traits is a concept explored in smalltalk. surely the greates monkey patchers among us. * array? yeah, it's called like that. it could even be named "fridge" or "smartass". * due to the new release process php BC is guaranteed for non major versions. adaption will be fast. * thriving ecosystems don't matter, PHP is just one possible piece in the toolchain.

thriving ecosystems don't matter? that seems like a silly thing to say.

Re: What to Look For in PHP 5.4

#45
post #29

Earlier quoted context omitted.

It becomes "hate" when the criticism is ill-informed and largely irrelevant. The bits of PHP that are "much worse" are mostly either legacy cruft that nobody in their right mind uses anymore, or bits are rarely touched in day to day programming but are safely wrapped in frameworks, ORM's, libraries etcetera. Beyond that, PHP simply isn't particularly elegant (mostly since it was never really designed to be a programm…

>The bits of PHP that are "much worse" are mostly either legacy cruft that nobody in their right mind uses anymore, or bits are rarely touched in day to day programming but are safely wrapped in frameworks, ORM's, libraries etcetera. Huh? The article in question demonstrates otherwise, note they just now fixed one of the problems with anon functions, a relatively new feature. PHP continues along the path of adding "f…

>PHP continues along the path of adding "features" randomly and without even understanding the purpose behind the feature, and so you get half-features that kinda work and don't really solve any problem in the context of PHP, but were just added so they could check off "some feature we don't understand" on the feature list.

This is not how features get added to PHP. Please spend some time on the PHP mailing list if you would like to know how it works.

Re: What to Look For in PHP 5.4

#47
post #5

It's been a long time since I had any interest at all in PHP, and these new features make me feel uneasy once again. The development server seems like the only good thing about it. Traits looks like a silly implementation of multiple inheritance mixins, with a 'use' keyword that doesn't really fit in with the language itself. And the whole 'insteadof' thing looks weird. It will lead to hackish code for many people, e…

Multiple inheritance is a silly implementation of traits/mixins and interfaces. MI combines implementation and type inheritance but with traits/interfaces those concepts are separate and therefore it is much more flexible.

The 'use' keyword already exists in PHP for use with namespaces; it's pretty common for C-based languages to overload common keywords.

As far as I'm aware, there are no backwards incompatible changes in this release and servers have been tracking the most recent PHP versions much better these days.

Also, array[1] is the correct terminology.

[1] http://en.wikipedia.org/wiki/Associative_array

Re: What to Look For in PHP 5.4

#48
post #41

Link didn't work for me, but http://jburrows.wordpress.com/2011/12/05/what-to-look-for-in... did. Not sure why the date would have changed to earlier.

I think this may have been posted prematurely. Even in the version you linked to, it seems like part of the traits example has been cut off.

It's been fixed. I found the correct revision and restored it with the right date. The original link works again.

Re: What to Look For in PHP 5.4

#49
post #45

Earlier quoted context omitted.

>The bits of PHP that are "much worse" are mostly either legacy cruft that nobody in their right mind uses anymore, or bits are rarely touched in day to day programming but are safely wrapped in frameworks, ORM's, libraries etcetera. Huh? The article in question demonstrates otherwise, note they just now fixed one of the problems with anon functions, a relatively new feature. PHP continues along the path of adding "f…

>PHP continues along the path of adding "features" randomly and without even understanding the purpose behind the feature, and so you get half-features that kinda work and don't really solve any problem in the context of PHP, but were just added so they could check off "some feature we don't understand" on the feature list. This is not how features get added to PHP. Please spend some time on the PHP mailing list if y…

Yes it is. Go read the list archives.

Re: What to Look For in PHP 5.4

#50
post #29

Earlier quoted context omitted.

What do you mean lately? PHP has gotten tons of well deserved criticism since it was created. It isn't "hate" to point out that a popular language is much worse than many other comparable languages.

It becomes "hate" when the criticism is ill-informed and largely irrelevant. The bits of PHP that are "much worse" are mostly either legacy cruft that nobody in their right mind uses anymore, or bits are rarely touched in day to day programming but are safely wrapped in frameworks, ORM's, libraries etcetera. Beyond that, PHP simply isn't particularly elegant (mostly since it was never really designed to be a programm…

Agreed. The "largely irrelevant" point I think is key. Just about every PHP pitfall is avoidable when employing best practices (something that is encouraged for all languages anyway).

We see the same thing with JavaScript and C++ (to a lesser extent) because some developers are simply afraid that a less experienced programmer might commit the sin of using the "bad parts", as if Python and Ruby transform careless career programmers into artisans.

Post reply on HN