[elm-discuss] Re: How do you name messages?

2016-10-24 Thread Birowsky
Thanx for this discussion, fellas. I cannot fully digest it at the moment, but I'm sure I'll be coming back to this as I go. -- 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

[elm-discuss] Re: How do you name messages?

2016-10-22 Thread Lars Jacobsson
> > > > >- What is the system supposed to do: RegisterWithCredentials String >String >- What happened in the system: ClickRegistrationSubmit String String / >TapRegistrationSubmit String String > > > Let's have an argumented discussion around this :} > I think one of the main

[elm-discuss] Re: How do you name messages?

2016-10-21 Thread art yerkes
I'd be on board with using both: case action of ... ClickRegistrationSubmit form -> let vErrors = validate form in vErrors |> Maybe.map (\ve -> update (ShowValidationErrors ve)) |> Maybe.withDefault (update (SubmitForm form)) separates concerns and levels of

[elm-discuss] Re: How do you name messages?

2016-10-21 Thread Birowsky
Well, they leaned towards the second approach. The reason was: *what if that action is not possible*. What if on SubmitForm, instead of sending the registration form, the app would need to display validation errors? I see that ambiguity. But from this perspective, it doesn't seem like a

[elm-discuss] Re: How do you name messages?

2016-10-21 Thread Simone Vittori
Why not both? Usually I find myself using the first approach more, especially when I have "actions" coming from the view (e.g. ChangeInput, SubmitForm). However I also use the second approach when I get some value back from a task (e.g. ParsedInput, ReceivedData). On Friday, 21 October 2016