Introduction Polymorphic variants in Rescript are strange beasts. They aren’t generally that useful in pure Rescript programming, but are frequently necessary in binding to Javascript. Polymorphic variants are extremely flexible (too flexible), but one of the most common uses is to represent a list of constant strings that a JS binding can accept. For example, the ubiquitous on function used for event handlers typically takes a string as its first parameter, as in on("click".

Continue reading

Parsing dynamic content such as JSON in a statically typed language can be rather daunting. This article voices some opinions about schemaless design and migrates some of the messy json parsing code from the standard library to the excellent jzon library.

Continue reading

Author's picture

Dusty Phillips

Canadian author and software developer.

Author and software developer

New Brunswick, Canada