News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

The Coders Lexicon:
My Love / Hate Relationship With PHP Traits
February 11, 2013 @ 12:50:45

On the Coder's Lexicon site, there's a recent post talking about the author's love/hate relationship with PHP traits, a relatively new feature of the language that apps for more "drop-in" functionality similar to mixins in other languages.

When I saw the introduction of PHP traits in 5.4.0 I was eager to learn all about them and how they worked. [...] PHP traits, in my opinion, are handy and very flexible. I guess that is the "love" part of my relationship with them. [...] However, I feel that traits also meddle with a bit of the inheritance rules that have been proven time and time again. Is it possible to love as well as hate something at the same time?

He talks first about "the love" he feels for using traits in his code. He talks about their usefulness for geting around PHP's single inheritance structure and being able to "bolt on" functionality as needed. Then comes "the hate" of them, noting that in the wrong hands, they could lead to very messy and lazy coding practices (including the deadly diamond of death problem).

0 comments voice your opinion now!
love hate traits good bad example mixin opinion


DZone.com:
What I Love/Hate About PHP
April 20, 2011 @ 09:05:20

On DZone.com today there's a new post from Eric Hogue talking about the love-hate relationship he has with PHP (as a developer of five years with it).

I have been programming in PHP for 5 years now. I did not choose this language, I had to learn it to work on the code of the company my bosses bought. Since I started, I heard many rants about how bad PHP is. Some where valid, but a lot of them are just blaming the language for bad code written by bad programmers. I am by no mean an expert in programming languages or PHP, but here is my take on the language I use every day.

His "good" section mentions one of the most popular things about the language - its quality of documentation. He also talks about the interactive shell and the community that surrounds the language. In the "bad" category, though, he points out things like the low barrier for entry ("a blessing and a curse"), the changing order of parameters in function calls and that a constructor of a child class doesn't automatically call the parent's constructor.

0 comments voice your opinion now!
love hate opinion language documentation easy community



Community Events





Don't see your event here?
Let us know!


unittest experience refactor code introduction install podcast opinion language configure interview developer community list testing threedevsandamaybe release framework laravel series

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework