Skip to content

Details

Sanctuary is a functional programming library for JavaScript inspired by Haskell and PureScript.

Not only is JavaScript dynamically typed, it's reluctant to raise exceptions. Applying a binary function to three arguments is not an error, for example. This results in type errors which may go undetected even in code with "full" test coverage.

Sanctuary performs run-time type checking to manifest type errors as soon as possible (in a dynamic environment). This—in my view—makes writing JavaScript not only bearable but enjoyable!

In this talk I'll introduce the type system, sanctuary-def (https://github.com/sanctuary-js/sanctuary-def), its strengths and weaknesses, the reasons it is so slow, and possible solutions to the performance problem.

Related topics

You may also like