Aviva Directory » Computers & Internet » Programming » JavaScript » PureScript

PureScript is a purely-functional, strongly-typed programming language designed to compile to JavaScript.

Designed by Phil Freeman in 2013, PureScript shares several features with Haskell, such as algebraic data types and pattern matching, higher kinded types, type classes, functional dependencies, and higher-rank polymorphism. It adds support for row polymorphism and extensible records, but lacks support for some of the more advanced features of Haskell, such as GADTs and type families.

Where possible, PureScript produces readable JavaScript code through a simple FFI Interface, allowing the reuse of existing JavaScript code.

Compiled PureScript code is readable, and code generation is predictable, whereas compiling the full Haskell programming language to JavaScript can result in overly large, unreadable code.

PureScript supports incremental compilation, including support for building source code editor plugins, which exist for several text editors, including Vim, Emacs, Sublime Text, Atom, and Visual Studio Code.

Phil Freeman, the designer of PureScript, is a Haskell coder, also familiar with TypeScript, who continues to participate in the development of the programming language and its libraries, although it has been picked up by the community and is developed on GitHub, which has added additional core tools, such as Pulp, its dedicated built tool, a documentation directory (Pursuit), and the package manager (Spago).

Pulp is a build and general automation tool for PureScript projects. Written in PureScript, it can be installed and run using NPM, while Pursuit is the package database for PureScript.

Although not as well known as TypeScript, PureScript has been adopted and put into production at several companies.

The focus of this part of our guide is on the programming language known as PureScript. Any editors, compilers, dialects, or IDEs, as well as PureScript user groups, forums, tutorials, or guides, are appropriate resources for this category.



Recommended Resources

Search for PureScript on Google or Bing