type BaseMsg
= InnerMsg InnerMsgType
| OtherInnerMsg OtherMsgType
because it allows us to split up our code better and reason about things better as humans (as little distraction as possible, I hate massive files with unrelated parts).
That being said, functions (views/updates) should be returning the BaseMsg, that way they have the ability only if needed to send out other messages as well.
Should be a fairly easy refactor, lots of changing function types and then adding prefixes to return the SuperType.
(Discussed this with feldman a while back, was led to this approach by him)
It's great to have:
because it allows us to split up our code better and reason about things better as humans (as little distraction as possible, I hate massive files with unrelated parts).
That being said, functions (views/updates) should be returning the
BaseMsg
, that way they have the ability only if needed to send out other messages as well.Should be a fairly easy refactor, lots of changing function types and then adding prefixes to return the SuperType.
(Discussed this with feldman a while back, was led to this approach by him)