PureScript
PureScript PureScript

PureScript is a strongly-typed functional programming language that compiles to JavaScript

PureScript, a programming language.

Core Characteristics and Language Features

PureScript is characterized as a strongly-typed functional programming language. A primary functionality is that it compiles to JavaScript, which is readable, and allows users to reuse existing JavaScript code easily.

The language supports the construction of real-world applications using advanced functional techniques and expressive types, such as:

  • Algebraic data types and pattern matching.

  • Row polymorphism and extensible records.

  • Higher kinded types.

  • Type classes with functional dependencies.

  • Higher-rank polymorphism.

Tooling, Ecosystem, and Functionalities

PureScript is designed to facilitate development of web applications, web servers, apps, and more.

Development and Build Tools:

  • It offers excellent tooling and editor support, including features like instant rebuilds.

  • The recommended build tool for PureScript is Spago, which can be installed using NPM.

  • NPM (Node Package Manager) is recommended for managing JavaScript dependencies within a project.

Installation:

  • PureScript can be installed via precompiled binaries available for OSX, Linux, and Windows.

  • It can also be installed using npm (npm install -g purescript), although this method requires Node version 8 or later.

Resources and Community:

  • The platform provides an extensive collection of libraries. Searchable documentation for these packages is hosted on the Pursuit package database.

  • Learning resources include the free book PureScript By Example (which contains practical projects for beginners), and a dedicated documentation repository on GitHub.

  • The language benefits from an active community, with places for discussion including the PureScript Discourse instance and the PureScript Discord server.