Toward a Better Front End Architecture: Elm - Codemash 2017
269 2 14757
Around 42:54 I erroneously claimed that the error at the top of the file is a "type error". I meant to state that it was a syntax error.
By mixedCase 2017-09-20
Compared to JS, yes. But it's not JS that Dart truly competes against, it's all the other compile-to-JS languages some of which I mentioned, and Dart simply can't beat their pragmatism and/or expresiveness.
Elm is deceptively easy since it has great docs, the best compiler errors in the entire industry (no exaggeration here) and skips all the voodoo incantations of pure functional programming favoring a familiar language instead. Took me a couple of days to start writing toy websites with it coming with no functional experience, and a week to be productive.
I'd suggest you take a look at some of the talks on Elm. This is a good one: https://www.youtube.com/watch?v=EDp6UmaA9CM
Anything by Richard Feldman is great, too.
By anonymous 2017-09-20
Pragmatic's Elm video course is the most productive way to learn Elm, especially if you are relatively new to web development.
Another video series that is highly recommended is http://courses.knowthen.com/courses/elm-for-beginners/lectures/1772403
Towards a better front-end architecture provides a good overview of Elm and also serves as a excellent motivation as to why you must learn the language.
By anonymous 2017-09-20
Http.send internally calls Task
Here are the Response from other channels (Slack & Youtube)
Elm's task system will eventually invoke the constructor function LoadUser.
Http.send creates a Cmd that we hand to the Elm architecture so it can perform the HTTP request on our behalf. The function we provide to Http.send informs Elm how we want to handle the result when it comes back.
You can see where the Cmd is created here: https://github.com/jfairbank/arch-elm/blob/master/app/src/Profile.elm#L120-L121.
Because we provide a Msg value LoadUser as our function to Http.send, it allows us to respond to LoadUser later in our update function once we have the result back.
Here is where Elm generates a Task: https://github.com/elm-lang/http/blob/master/src/Http.elm#L85-L87. The resultToMessage parameter would be LoadUser in this case.
It might be hard to understand with the function composition operator, but here is where eventually resultToMessage, or LoadUser in this case, gets called in the Task module: https://github.com/elm-lang/core/blob/5.1.1/src/Task.elm#L237-L243.
Popular Videos 6
Submit Your Video