25 Days of ReasonML – codeburst

Its biggest selling points are:An expressive static type system with very good type inferenceIt is a functional language whose data structures are immutable by defaultA powerful module systemAn easy-to-use toolchain for building JavaScript applicationsExcellent interoperability with the existing JavaScript OCaml ecosystemA syntax that looks kind of like JavaScriptBehind the scenes,…

I definitely went out of my way to use it in my Advent of Code solutions, and in most cases I felt like it gave me such a clear way to write down a problem that after a time it started to feel quite natural to break my program down…

Each ReasonML source file is considered a module; so in your code base, the things you write in Solver.re can automatically be referred to in other files like above.Functors are an advanced feature of ReasonML and OCaml that allows you to write modules that make new modules.

E.g.:Many built-in types have their own compare function in their module definition already, so we can usually do something like:Cool, what’s the point?I decided that, for Advent of Code, I would like to be able to easily create tests for my solutions.

ReasonML, however, has felt incredibly smooth in it’s onboarding due to it’s focus on providing simple tools built on top of existing ecosystems (npm, OCaml) and a community who’s incredibly friendly to people of all skill levels.In working through many of the Advent of Code challenges I found myself slipping…

2017 was my first year attempting Advent of Code: an annual challenge where participants tackle twenty five programming puzzles, released each day starting Dec. 1st to Dec. 25th. I’m a mobile and…

25 Days of ReasonML2017 was my first year attempting Advent of Code: an annual challenge where participants tackle twenty five programming puzzles, released each day starting Dec. 1st to Dec. 25th.I’m a mobile and front-end developer by day and work mostly with React React Native, so Advent of Code felt like a nice change of pace: streaks of CS fundamentals ran through the problems and I frequently found myself looking up algorithms, data structures, and tackling problems I hadn’t encountered since college. Each day’s puzzle usually only took an hour or two to solve (although some of the harder problems took me more than a couple days!) and were fairly self-contained (although some later days built on the previous).A few months before December, I had started teaching myself a new language called ReasonML. ReasonML is a statically typed language of the ML family that compiles to both JavaScript as well as native executables. Its biggest selling points are:An expressive static type system with very good type inferenceIt is a functional language whose data structures are immutable by defaultA powerful module systemAn easy-to-use toolchain for building JavaScript applicationsExcellent interoperability with the existing JavaScript OCaml ecosystemA syntax that looks kind of like JavaScriptBehind the scenes, the truth is that ReasonML is simply a new syntax for OCaml, a language that has been around for over 20 years. The team behind ReasonML is working on creating a suite of tools, libraries, and documentation in order to create a platform for doing modern web development.To…