Elm
http://elm-lang.org/
Mostovenko Alexander
● fullstack engineer in datarobot
● for inspiration: haskell, elm, purescript
● for job: python, javascript
● twitter - https://twitter.com/MostovenkoA
● github - https://github.com/AlexMost
Elm in general
● Functional (ML-like, compiles to js).
● Immutable data structures.
● Statically typed. (ADT, type inference).
● With FRP in mind (Signals are built in language).
● Created for building rich UI apps.
Idea
Why another to-js lang ?
front end devs
front end devs
Haskell
OCaml
F#
...
front end devs
Haskell
OCaml
F#
...
Purescript
Fay
Elm
GHCJS
front end devs
Haskell
OCaml
F#
...
Purescript
Fay
Elm
GHCJS
Elm
The main focus
● Easy to get started.
● Simple and clean syntax.
● Focus on business logic (no frameworks holy wars e.t. c.).
● Simple refactor.
● Simple add features.
● Less bugs in production.
Minimal but powerful syntax
type alias Model = Int
-- UPDATE
type Action = Increment | Decrement
update : Action -> Model -> Model
update action model =
case action of
Increment -> model + 1
Decrement -> model - 1
● Comments
● Literals
● Lists
● Conditionals
● Union Types
● Records
● Functions
● Infix Operators
● Let Expressions
● Applying Functions
● Mapping with (<~) and (~)
● Modules
● Type Annotations
● Type Aliases
● JavaScript FFI
Extensible records
point = { x = 3, y = 4 } -- create a record
point.x -- access field
map .x [point,{x=0,y=0}] -- field access function
{ point - x } -- remove field
{ point | z = 12 } -- add field
{ point - x | z = point.x } -- rename field
{ point - x | x = 6 } -- update field
{ point | x <- 6 } -- nicer way to update a field
{ point | x <- point.x + 1
, y <- point.y + 1 } -- batch update fields
Extensible records
sumCoordinates: {a | x: Int, y: Int} -> Int
sumCoordinates {x, y} = x + y
http://research.microsoft.com/pubs/65409/scopedlabels.pdf
No runtime exceptions
(almost)
let list = [1, 2, 3];
let first = (lst) => lst[0];
let doubleFirst = (lst) => first(list) * 2
list = [1, 2, 3]
first lst = List.get 0 list
doubleFirst lst = (first lst) * 2
js Elm
let list = [1, 2, 3];
let first = (lst) => lst[0];
let doubleFirst = (lst) => first(list) * 2
list = [1, 2, 3]
first lst = List.get 0 list
doubleFirst lst = (first lst) * 2
js Elm
let list = [1, 2, 3];
let first = (lst) => lst[0];
let doubleFirst = (lst) => first(list) * 2
list = [1, 2, 3]
first list = get 0 list
doubleFirst list = case first list of
Just n -> Just (n * 2)
Nothing -> Nothing
js Elm
let list = [1, 2, 3];
let first = (lst) => lst[0];
let doubleFirst = (lst) => first(list) * 2
But it doesn’t fail if []?
NaN
Signals
UI app architecture
● Unidirectional data flow
● Virtual dom
● FRP based approach
The Elm architecture
https://github.com/evancz/elm-architecture-tutorial/
● Model (State)
● Update
● View
Blazing fast rendering
http://evancz.github.io/todomvc-perf-comparison/
Ecosystem
● Package manager
● Packege catalog - http://package.elm-lang.org/
● build tool (elm-make, elm-reactor)
● time travel debugger
● hot swap
Elm package manager
Semantic versioning (1.0.0 - major.minor.patch)
elm-package bump - new version
can see diff - elm-package diff 1.0.1
Time travel debugger
mario demo - http://debug.elm-lang.org/edit/Mario.elm
Unit Testing
https://github.com/deadfoxygrandpa/Elm-Test
Elm exists in production
Demo
2048 - https://github.com/AlexMost/2048
more demos - http://elm-lang.org/examples
:)

More Related Content

PDF
Introduction to Elm
PDF
Elixir and Phoenix for Rubyists
PDF
How much performance can you get out of Javascript? - Massimiliano Mantione -...
PDF
JDK8 Functional API
PDF
LINQ Inside
PPTX
Elm: Make Yourself A Happy Front-end Web Developer
PPT
Laurens Van Den Oever Xopus Presentation
PDF
Reflection in Pharo: Beyond Smalltak
Introduction to Elm
Elixir and Phoenix for Rubyists
How much performance can you get out of Javascript? - Massimiliano Mantione -...
JDK8 Functional API
LINQ Inside
Elm: Make Yourself A Happy Front-end Web Developer
Laurens Van Den Oever Xopus Presentation
Reflection in Pharo: Beyond Smalltak

What's hot (20)

PDF
Reflection in Pharo: Beyond Smalltak
PDF
使用.NET构建轻量级分布式框架
PDF
Dynamically Composing Collection Operations through Collection Promises
PDF
Building a Tagless Final DSL for WebGL
ODP
A Tour Of Scala
PDF
Advanced Reflection in Pharo
PDF
Functional Programming In Practice
PDF
Hipster oriented programming (Mobilization Lodz 2015)
PDF
Scala - just good for Java shops?
PDF
Scala coated JVM
PPTX
Kotlin on android
PDF
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
PDF
Hipster Oriented Programming
PDF
Use the @types, Luke
PDF
2014 java functional
PPTX
Introduction to java 8 stream api
PDF
What You Need to Know About Lambdas - Jamie Allen (Typesafe)
PDF
Functional Programming for Busy Object Oriented Programmers
PPTX
Closures
PPTX
Scala for rubyists
Reflection in Pharo: Beyond Smalltak
使用.NET构建轻量级分布式框架
Dynamically Composing Collection Operations through Collection Promises
Building a Tagless Final DSL for WebGL
A Tour Of Scala
Advanced Reflection in Pharo
Functional Programming In Practice
Hipster oriented programming (Mobilization Lodz 2015)
Scala - just good for Java shops?
Scala coated JVM
Kotlin on android
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
Hipster Oriented Programming
Use the @types, Luke
2014 java functional
Introduction to java 8 stream api
What You Need to Know About Lambdas - Jamie Allen (Typesafe)
Functional Programming for Busy Object Oriented Programmers
Closures
Scala for rubyists
Ad

Viewers also liked (7)

PPTX
Modern javascript localization with c-3po and the good old gettext
PDF
rx.js make async programming simpler
PDF
Rxjs kyivjs 2015
PPTX
UX metrics
PPTX
структура It компании
PDF
Agile UX & OOUX
PDF
SlideShare 101
Modern javascript localization with c-3po and the good old gettext
rx.js make async programming simpler
Rxjs kyivjs 2015
UX metrics
структура It компании
Agile UX & OOUX
SlideShare 101
Ad

Similar to Elm kyivfprog 2015 (20)

PPT
C# programming
PPT
sonam Kumari python.ppt
PDF
Monads in Swift
PPTX
A brief introduction to lisp language
PPTX
Python 培训讲义
PDF
Writing a compiler in go
PDF
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
PPT
Groovy Introduction - JAX Germany - 2008
PPT
Interm codegen
PDF
CS4200 2019 | Lecture 5 | Transformation by Term Rewriting
PDF
Clojure intro
ODP
Getting started with Clojure
PDF
T3chFest 2016 - The polyglot programmer
PPT
Python scripting kick off
PPTX
Combinators, DSLs, HTML and F#
PPTX
Coding convention
PPTX
The joy of functional programming
PDF
External Language Stored Procedures for MySQL
PPT
Profiling and optimization
PDF
2014 holden - databricks umd scala crash course
C# programming
sonam Kumari python.ppt
Monads in Swift
A brief introduction to lisp language
Python 培训讲义
Writing a compiler in go
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
Groovy Introduction - JAX Germany - 2008
Interm codegen
CS4200 2019 | Lecture 5 | Transformation by Term Rewriting
Clojure intro
Getting started with Clojure
T3chFest 2016 - The polyglot programmer
Python scripting kick off
Combinators, DSLs, HTML and F#
Coding convention
The joy of functional programming
External Language Stored Procedures for MySQL
Profiling and optimization
2014 holden - databricks umd scala crash course

Recently uploaded (20)

PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PDF
DNT Brochure 2025 – ISV Solutions @ D365
PDF
Types of Token_ From Utility to Security.pdf
PDF
CCleaner 6.39.11548 Crack 2025 License Key
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
PDF
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PDF
Cost to Outsource Software Development in 2025
PPTX
Tech Workshop Escape Room Tech Workshop
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PDF
AI Guide for Business Growth - Arna Softech
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
PDF
MCP Security Tutorial - Beginner to Advanced
PPTX
GSA Content Generator Crack (2025 Latest)
PPTX
Introduction to Windows Operating System
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
PPTX
Cybersecurity: Protecting the Digital World
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
DNT Brochure 2025 – ISV Solutions @ D365
Types of Token_ From Utility to Security.pdf
CCleaner 6.39.11548 Crack 2025 License Key
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
Monitoring Stack: Grafana, Loki & Promtail
Cost to Outsource Software Development in 2025
Tech Workshop Escape Room Tech Workshop
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
AI Guide for Business Growth - Arna Softech
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
MCP Security Tutorial - Beginner to Advanced
GSA Content Generator Crack (2025 Latest)
Introduction to Windows Operating System
Designing Intelligence for the Shop Floor.pdf
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
Cybersecurity: Protecting the Digital World

Elm kyivfprog 2015