Thanks for the detailed feedback!
Very good point about the Controls
module - your approach greatly simplifies things. I’d been under the impression that defining a ControlsMsg
type within the module also implied defining ControlsModel
, updateControls
, etc, and making it a full-on “component”. I realise now that’s not the case though!
And yup, I probably did go overboard with |>
. I found the withoutCmd
util handy in a couple of cases, then used it in all the update
branches for the sake of consistency (probably not a good justification, as it’s not needed in most of them).
Replacing the if
/else
chain with min
/max
from Basics
is also a handy tip. With that change, I’m down to a single if
expression in the entire program now. I found your thread on the topic quite interesting (If-then-else versus case expressions) - I might use a custom type to remove the remaining if