Programming

Visual Overview of Reason(ML) and JavaScript

Overview of the similarities and differences between ReasonML and JavaScript
April 18, 2018
--
User avatar
Adrian Perez
@blackxored

Basics

JavaScript Reason
Double quoted strings embed:strings.js embed:strings.re
Single quoted strings embed:single-quote.js
Multi-line strings embed:multiline.js
Boolean embed:booleans.js
Nothing embed:nothing.js
Numbers embed:numbers.js
Numbers with decimals embed:floats.js
Comments embed:line-comments.js
Block comments embed:block-comments.js
Regular Expressions embed:regexp.js

Collections

JavaScript Reason
Array embed:arrays.js embed:strings.js
Maps / JS Object embed:maps.js embed:strings.js
Sets embed:sets.js embed:strings.js

Functions

JavaScript Reason
Functions embed:functions.js embed:strings.re
Shorthand functions embed:shorthand-functions.js embed:strings.re
Function invocation embed:function-invocation.js embed:strings.re
Anonymous functions embed:anonymous-functions.js embed:strings.re
Anonymous shorthand functions embed:anonymous-shorthand-functions.js embed:strings.re
map embed:map.js embed:strings.re
filter embed:filter.js embed:strings.re
reduce embed:reduce.js embed:strings.re

Flow Control

JavaScript Reason
if without else clause embed:if-without-else.js embed:strings.re
if with else clause embed:if-with-else.js embed:strings.re
ternary embed:ternary.js embed:strings.re
if with multiple else embed:if-with-multiple-else.js embed:strings.re
switch embed:switch.js embed:strings.re

Truthiness

JavaScript (7) Reason
Falsy embed:falsy.js

State

JavaScript Reason
Atom Requires library, e.g redux, mobx embed:ref.re

Interop

JavaScript Reason
Method call
Property access
Property setting
window method call
~ EOF ~

Craftmanship Journey
λ
Software Engineering Blog

Stay in Touch


© 2018 Adrian Perez