Elm (programming language)

from Wikipedia, the free encyclopedia
Elm
Elm logo
Basic data
Paradigms : functional
Publishing year: 2012
Designer: Evan Czaplicki
Current  version : 0.19.1   (October 21, 2019)
Typing : strong , static
Influenced by: Haskell , Standard ML , OCaml , F #
License : Revised BSD
elm-lang.org -

Elm is a functional programming language for the declarative programming of graphical interfaces (GUIs) for web applications . Elm compiles to JavaScript and aims to simplify the typical tasks of programming graphical interfaces.

history

Elm was developed in 2012 by Evan Czaplicki as part of his master's thesis. In 2013, Evan Czaplicki was hired by Prezi as an open source engineer to continue working on Elm. The Elm Software Foundation was founded in 2016 with the aim of driving the further development of Elm. "Elm-Conf" was launched in 2016 to support the spread of Elm. The programming language is discussed by numerous user groups around the world at regular events.

properties

Elm offers typical language constructs such as if expressions, let expressions and list operations.

Immutability

All values in Elm are immutable (Engl. Immutable ). This means that once initialized values ​​can no longer be modified. There are persistent data structures for mapping constructs like Arrayand Dictused.

Static typing

All values ​​in Elm are statically typed . Each value can be annotated with a type definition. The following types are available, among others:

  • Primitive types like Boolean, Integer, and String
  • Simple data structures such as lists and expandable records

The Elm compiler can determine at compile time whether an application is type-safe in order to avoid runtime errors.

Subscriptions

As a replacement for the previous concept of “signals”, the term “subscription” was introduced in Elm 0.17. This concept serves as an interface to constructs in JavaScript and thus enables the use of JavaScript APIs and libraries based on them.

architecture

Elm's architecture is partly derived from the design and the properties of the language itself and is intended to enable better maintainability and easier refactoring of application parts. Specific tasks such as state management or handling asynchronous events should also be elegantly mapped. Thus Elm gained some notoriety as a source of inspiration for the popular state management library Redux, which is a popular solution in the React ecosystem.

Compiler

A powerful compiler with meaningful error messages should offer a simple introduction to development with Elm. The frequent runtime errors familiar from JavaScript should already be shown in the compilation step and thus avoided. Entry hurdles such as learning complex build tools should not be necessary in Elm. The error messages of the Elm compiler were often used as best practice and source of inspiration. Today, for example, Reason and Rust also use such error messages.

Other implementations

  • Miso is a Haskell implementation of the Elm API.
  • TEA is an OCaml implementation of the Elm API.
  • Elimish is an F # implementation of the Elm API.
  • Oak is a Clojure implementation of the Elm API.

Web links

credentials

  1. Elm license. Retrieved May 13, 2020 .
  2. Evan Czaplicki's master's thesis on Elm. (PDF) March 30, 2012, accessed December 13, 2018 .
  3. ^ New Adventures for Elm
  4. elm-conf 2016
  5. Elm User Group Cologne , Elm Usergroup Sydney , Elm Usergroup San Francisco , Elm Usergroup San Francisco , Elm Usergroup Zurich , Elm London , Elm Usergroup Dublin , Elm Copenhagen
  6. ^ Core Language. In: Elm Documentation. Retrieved May 13, 2020 .
  7. Types. In: Elm Documentation. Retrieved May 13, 2020 .
  8. A Farewell to FRP. In: elm-lang.org. Retrieved May 13, 2020 .
  9. ^ Prior Art. In: Redux Documentation. Retrieved May 13, 2020 .
  10. ^ Smashing Magazine - Introduction to Redux
  11. ^ Shape of errors to come. In: The Rust Programming Language Blog. Retrieved September 7, 2016 .
  12. Way way waaaay nicer error messages. In: The Rust Programming Language Blog. Retrieved September 7, 2017 .