scala - Traits vs template -


i m new in scala , wonder what's differences between traits , template ? when should use template , when should use traits ? thanks

it depends mean template.
if (wikipedia) feature allow functions , classes operate generic types, template , trait 2 orthogonal notions.

traits can use generic type (see so question instance), there here offer alternative multiple inheritance, offering mixin class composition stackable behavior.


Comments

Popular posts from this blog

Delphi Wmi Query on a Remote Machine -