Implement Vefer and Diger as Structs.
m00sey opened this issue · 1 comments
m00sey commented
@Artemkaaas commented the following:
Hey,
Why do we have Matter as structure and Verfer, Diger, etc as traits?
What’s idea behind this?
As for me it should be opposite. if we want to define different kinds of primitives there should be defined Matter as trait and add structures Verfer , Diger , etc which implements Matter,
Groups will consists of various primitives.
With currently implemented approach, if I have Matter instance I can call any methods from all implemented traits Verfer Diger etc . That seems to be wrong.
Using trait as a fields of Group structure adds a lot of complexity because we have to wrap it into Box .
The observation is correct, @jasoncolburne and myself missed adhering to the premise Matter is essentially an abstract concept, providing behavior (infil/exfil/binfil/besfil) to derivatives.
@jasoncolburne implemented Cigar
as a struct composing Matter to access its behavior.
I think this is a good first refactor for the remaining Diger
and Verfer
implementations.
A second refactor would be to move Matter to a trait. Separate issue #73
jasoncolburne commented
This makes sense to me.