Hacker News new | ask | show | jobs
by roel_v 5222 days 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?
1 comments

Amongst other things, traits are a way to provide interface delegation. Imperfect, but a lot better than the current solutions.