>
> One reason is what Evan says at 
> https://github.com/elm-lang/core/blob/master/CONTRIBUTING.md#adding-new-functions:
>  
> new functions are not so quickly expected to go into core, instead to be 
> accumulated in *-extra packages first.
>
I didn't realize that was the case. Thanks for the info.

it is better to do a recursive call to the `update` function, or better 
> yet: call the function that your command would call
>

I respectfully disagree. Depending on the application, this either may not 
be possible or would be a terrible code smell. I honestly think the above 
suggestion would be worse than chaining another Cmd msg. Sending another 
Cmd msg is clean and follows the Elm architecture.

Another case that wouldn't work out so well for is the init function. The 
init function returns a (model, Cmd msg). I think it'd be much cleaner for 
the init function to call sendMsg (or equivalent) instead of the init 
function calling either my update function or the function that would be 
called for that msg.

> ​
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to