ReasonML: First Look
1hAdvanced2020-02-28
Authors

J. David Eisenberg
Programmer and Instructor living in San Jose, California
Course details
Adding type annotations to JavaScript using TypeScript or similar tools can help with basic debugging, but types have much more to offer. ReasonML—a new syntax for OCaml that compiles to JavaScript—offers advanced developers new possibilities for greater readability, performance, and maintainability of code. ReasonML brings the strong typing and functional style of OCaml to the web in a syntax that’s familiar to JavaScript developers.
In this course, join instructor J. David Eisenberg as he details the most salient features of ReasonML. Explore fundamental concepts, including the built-in ReasonML data types and pattern matching. Learn about the ReasonML type system, defining your own data types, and the power of type inference—which lets you write code without having to manually specify types. Plus, take a look at how JavaScript and ReasonML interoperate as you create a ReasonReact project.
In this course, join instructor J. David Eisenberg as he details the most salient features of ReasonML. Explore fundamental concepts, including the built-in ReasonML data types and pattern matching. Learn about the ReasonML type system, defining your own data types, and the power of type inference—which lets you write code without having to manually specify types. Plus, take a look at how JavaScript and ReasonML interoperate as you create a ReasonReact project.
Skills covered
ReasonMLLearningProgramming LanguagesOpen SourceSoftware Development
Concepts
0. Introduction
- 01 - Why ReasonML could be the language for you
- 02 - Base knowledge and setup
1. ReasonML Fundamentals
- 03 - Variables and data types
- 04 - Functions and annotations
- 05 - Decisions with if and switch expressions
- 06 - Output with Js.log()
- 07 - Challenge - Quadratic formula
- 08 - Solution - Quadratic formula
2. The ReasonML Type System
- 09 - Creating your own data types
- 10 - Say goodbye to null and undefined
- 11 - Creating modules for reusable code
- 12 - Using collection types
- 13 - Creating record types
- 14 - Challenge - Generating random cakes
- 15 - Solution - Generating random cakes
3. Interoperating with JavaScript
- 16 - Web pages with ReasonReact
Conclusion
- 17 - Explore ReasonML resources