Thank the creator of Elm and BDFL, Evan Czaplicki.
I would highly recommend reading the guide and writing elm code before watching any videos.
- Read the Guide. This is a gitbook by the creator of Elm
- Try Elm out in the browser. (Hint - try the stuff from the book)
- Watch a video series to remind yourself of the concepts.
- Complete the Elm for beginners course over the weekend
- Complete the exercises for that course
- Oh! And setup your computer to to Eฮปmy stuff:
- Install NodeJS LTS
- Install elm with
npm install -g elm
- Configure atom.
elm-oracle
,elm-format
,linter-elm-make
to lint on save.
- Code is the Easy Part by Evan Czaplicki
ELM Apps use this terminology for talking about it's design pattern.
- Model
- Update
- View
- Subscribers
- Commands
Nice overview video of the architecture
Everything is an expression in elm, that's why theres no return
statement
All data is immutable in Elm
Elm is strongly typed - there is not implicit type conversion. If a function takes a String you can't give it a Number, you must explicitly convert it to a String (2 -> "2")
Elm has a friendly compiler :) Very verbose and likes to suggest things.
- No Side effects
- Reusable
- Composable
- Testable
- Cacheable
- ...
Import everything from Html into our modules namespace
import Html exposing (..)
Import a few things from Html into our modules namespace
import Html exposing (text, div)
Parameterized type
view : Model -> Html Msg
Union type
type Msg
= Increment
| Decrement
Type aliasing (call an Int by Model)
type alias Model =
Int
random questions What is the technical difference between a statement and an expression?
Example : if/else in Elm, vs. if in other langs.
If elm is meant for front end web applications why does the html package come seperate?
Baby app ideas:
- Show random ascii art face
- Searchable ascii art faces (face with searchable keywords, click to show matching faces)