So he’s mad because he doesn’t understand traits

Booblet
1 min readSep 11, 2016

The point of traits is to give you a set of typed guarantees over generic behaviour. You can get the same behaviour wrt fields if you specialise the traits functions on a structural type, which is what structs are for, you know to define things like structure (fields).

This post can be condensed as: OP gets confused about what abstract classes are, tries to map that to a trait which is something completely different and cries when it doesn’t work the same way as C++, a language full of pitfalls.

--

--