Elm (programming language)

Elm is a domain-specific programming language for declaratively creating web browser-based graphical user interfaces.

It advertises "no runtime exceptions in practice",[10] made possible by the Elm compiler's static type checking.

[14] The initial implementation of the Elm compiler targets HyperText Markup Language (HTML), Cascading Style Sheets (CSS), and JavaScript.

[15] The set of core tools has continued to expand, now including a read–eval–print loop (REPL),[16] package manager,[17] time-travelling debugger,[18] and installers for macOS and Windows.

[21] Elm has a small set of language constructs, including traditional if-expressions, let-expressions for storing local values, and case-expressions for pattern matching.

Elm programs render HTML through a virtual DOM, and may interoperate with other code by using "JavaScript as a service".

Elm uses persistent data structures to implement its arrays, sets, and dictionaries in the standard library.

Types include primitives like integers and strings, and basic data structures such as lists, tuples, and records.

Rather than allow any value to be implicitly nullable (such as JavaScript's undefined or a null pointer), Elm's standard library defines a Maybe a type.

The projects are mainly stuck on Elm version 0.18.0 since newer ones do not support "native" code and some other utilized features.

In more sophisticated applications, messages may come from various sources: user interaction, initialization of the model, internal calls from update, subscriptions to external events (window resize, system clock, JavaScript interop...) and URL changes and requests.

This means that, for example, Elm does not have a generic map function which works across multiple data structures such as List and Set.

[34] Another outcome is a large amount of boilerplate code in medium to large size projects as illustrated by the author of "Elm in Action" in their single page application example[35] with almost identical fragments being repeated in update, view, subscriptions, route parsing and building functions.