News for hackers. Stuff that matters.
Re:PHP 5.4.0 released by roel_v on Friday March 02, 2012 @03:18AM (#3655851)
I've used traits a few times and in each case replaced it later by either inheritance or moving the functionality into separate classes. I'm not getting the design considerations that call for traits over alternatives. How would one use, and why is it the better option?
Re:PHP 5.4.0 released by nolok on Friday March 02, 2012 @05:35AM (#3656131)
Amongst other things, traits are a way to provide interface delegation. Imperfect, but a lot better than the current solutions.