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

php - How to build a web site which gives a sub-domain dynamically to every registered user? -

android - View with visibility state GONE taking up space on screen -