Hacker News new | ask | show | jobs
by magicalhippo 2620 days ago
How are traits specific to being a functional language rather than an OO language though?

I mean, I don't see anything horribly functional-language-specific about your trait example.

1 comments

It wasn't my example, but it's just disproving the notion that FP somehow means you need to write big if statements to dispatch your functions.

Traits are not functional-language specific except in that they are often used in FP to solve problems similar to those one might use inheritance to solve in OOP.