Re: [elm-discuss] View API stylistic question

2016-09-22 Thread Mark Hamburg
Argument for the first style: It extends nicely to handle things like sorted table where we need to generate messages of the same type for table sort state changes and for messages from the displayed table data. That's harder to do with the second style — you basically need to create a type to w

Re: [elm-discuss] View API stylistic question

2016-09-22 Thread Joaquín Oltra
First one as goto option for splitting view functions out. Second one if viewCheckbox is a standalone reusable triplet with internal state and Msg types (much less often). This talk from Ossi gives great insight on different ways to organize your code https://www.youtube.com/watch?v=vpc80c5iC6

Re: [elm-discuss] View API stylistic question

2016-09-21 Thread Nick H
I prefer the former style. It's less verbose, and it means my Main module is the only one that needs to import Html.App. Also, with the latter style, your helper is going to have something like "Html.Events.onCheck identity", which seems a little silly. That's just my preference though. I think ei