JavaScript's dynamic typing makes the language incredibly flexible. That flexibility comes at a cost. Because any variable can potentially be of any type, it's easy to inadvertently introduce runtime Type errors into an application.
The Maybe data type encapsulates the defensive coding needed to avoid such errors, keeping our application code focused on the task at hand.
In this course, we'll look at the Maybe type in action. We'll be relying on the Maybe exposed by the crocks library, but the core concepts and much of the API translates to other implementations. We'll learn how to construct a Maybe and apply transformations to data within those safe confines. We'll also cover point-free utility functions that let us build up function compositions for working with Maybes
After completing this course, you'll have the tools to write safe, declarative JavaScript that can be easily composed while avoiding the unnecessary noise of sprinkling imperative conditional statements throughout your code.
Hope you don't mind a slightly meta question, are you able to let us know the font you're using, and the extension which is providing the live preview for variables and errors?
Hey Benjamin, can't speak for the font, but the extension being used is called quokka.js. FWIW, I think it is a fantastic JS scratchpad, can't recommend it enough. https://quokkajs.com/
Hope you don't mind a slightly meta question, are you able to let us know the font you're using, and the extension which is providing the live preview for variables and errors?
The font is operator mono, and Guy is right. The live preview is coming from Quokka.
Thanks for the answers! Going to have to try these both out myself.
What's the plugin you're using for vscode to eval your JS inline with the editor?
That plugin is called Quokka - https://quokkajs.com/
@Benjamin there's a really good Operator Mono alternative called Dank (https://dank.sh) which is quite a bit more affordable.
Dank Mono is fantastic, recently switched to it myself.
Do you think its possible and clean to use the library with TypeScript ?
Do you think its possible and clean to use the library with TypeScript ?
Since TS is a superset of JS, it’s possible. I don’t know if crocks has typings defined, so you might not get the type support you’d get out of the box with other libraries.
Hi Andy, First off, thanks for your videos; really enjoyable explanations on Functional Programming topics. Second - to allow the continuation of the meta questions: Which VS color scheme are you using here? (Yes, we want to be exactly like you ;))
I’m glad you’re enjoying the videos :)
The theme used in this video is the one found here:
https://github.com/orefalo/bcmarinacci.theme-material-operator-1.3.0