elm-tutorial icon indicating copy to clipboard operation
elm-tutorial copied to clipboard

Introducing `Cmd` explicitly

Open lucasdicioccio opened this issue 7 years ago • 0 comments

Hi, thanks for the Tutorial, very useful. For calibrating this "issue": I'm new to Elm with a strong Haskell background.

One thing I found disturbing is that Cmd felt magical. Elm seems very explicit about imports and Cmd is in scope without import. I suggest to add a short paragraph about what Cmd is and how it comes into scope in 02-elm-arch/02-structure.html -- right when Cmd is used. Presently, Cmd.none is given out w/o much explanation (or I missed a section). Maybe the application flow diagram could be usefully brought at this point. Another way to address this is to stress what consumes the Cmd when commenting the type of update : Msg -> Model -> ( Model, Cmd Msg ) .

lucasdicioccio avatar May 27 '17 12:05 lucasdicioccio