ReasonML: Hands-On Intro

By: Rob Hilgefort

Rob Hilgefort

  • Email: rjhilgefort@gmail.com

  • Twitter: @rjhilgefort

  • GitHub: rjhilgefort

  • Web: http://rob.hilgefort.me

  • 10 Years Professional JS

  • 3 Years FP in JS

  • 6 Months ReasonML

Why ReasonML...?

JavaScript

  • JavaScript isn't opinionated and tries to support OOP and FP equally (debatably).
  • JavaScript is ... JavaScript.
  • Defensive Coding

FP By Default

- Immutable

- Auto-curried

- Composition- Pipe operator

- Pattern Matching

- Plus more...
 

Statically Typed

- Battle tested Ocaml compiler and type system

- 100% coverage

 

Isomorphic

- Runs on the BE and FE

- JS is popular largely due to this

- Can run natively on BE if desired

Batteries Included DX

TypeScript/Flow ReasonML
Prettier Reformat
Babel BuckleScript
Immutable.js ReasonML
Ramda.js ReasonML
Maybe Monad ReasonML

Ecosystem

REPL Examples Topics

  • Imperative Loops
  • Mutating
  • Currying
  • Partial Applications
  • Basic Types
  • Pervasives (Built-Ins)
  • Infix Operators
  • Strings
  • Bucklescript / JS Funcs
  • Expressions, Blocks
  • Implicit Returns
  • Switch Expressions
  • Pipe Operator
  • Composition
  • Modules
  • Variants
  • Pattern Matching
  • Variant Constructors
  • Record Type
  • Shorthands (Fn, Switch)
  • Labeled Arguments
  • Option Variant
  • Fast Piping

😱 Live Coding 😱

Thank You

  • Email: rjhilgefort@gmail.com

  • Twitter: @rjhilgefort

  • GitHub: rjhilgefort

  • Web: http://rob.hilgefort.me

ReasonML Hands-on Intro

By rjhilgefort

ReasonML Hands-on Intro

ReasonML Hands-on Intro

  • 73