3 ms·
Really looking forward to traits. We have some hacks using interfaces and __call that we have been using to try and approximate traits, but the real thing is al
by tabbyjabby 15y ago
Really looking forward to traits. We have some hacks using interfaces and __call that we have been using to try and approximate traits, but the real thing is always much better. :)
- maratd 15y agoSame here. This is a move away from inheritance to mixins. They did a stellar job with it and it's really flexible. Check out http://us2.php.net/traits http://us2.php.net/traits for the nitty-gritty.
- roel_v 15y agoI'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?
- nolok 15y agoAmongst other things, traits are a way to provide interface delegation. Imperfect, but a lot better than the current solutions.