3 ms·
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 des
by roel_v 15y ago
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?
- nolok 15y agoAmongst other things, traits are a way to provide interface delegation. Imperfect, but a lot better than the current solutions.