Elm (programming language)
Elm | |
---|---|
![]() |
|
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 Array
and Dict
used.
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
- Official website
- Thesis by Evan Czapliki at Harvard University on his Elm language
- Elmweekly - Weekly news about Elm (English)
- Rethinking All Practices: Building Applications in Elm , lecture of the conference React Conf 2016 onYouTube(English)
- Advanced seminar "Programming Languages" WS 2015/2016 at the University of Passau
- Programming languages Elm in 16th place among the programming languages developed on GitHub by Stars / Likes. (github.com, accessed September 9, 2016)
- Adventures in Elm , presentation of the Goto Chicago 2016 conference onYouTube(English)
credentials
- ↑ Elm license. Retrieved May 13, 2020 .
- ↑ Evan Czaplicki's master's thesis on Elm. (PDF) March 30, 2012, accessed December 13, 2018 .
- ^ New Adventures for Elm
- ↑ elm-conf 2016
- ↑ 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
- ^ Core Language. In: Elm Documentation. Retrieved May 13, 2020 .
- ↑ Types. In: Elm Documentation. Retrieved May 13, 2020 .
- ↑ A Farewell to FRP. In: elm-lang.org. Retrieved May 13, 2020 .
- ^ Prior Art. In: Redux Documentation. Retrieved May 13, 2020 .
- ^ Smashing Magazine - Introduction to Redux
- ^ Shape of errors to come. In: The Rust Programming Language Blog. Retrieved September 7, 2016 .
- ↑ Way way waaaay nicer error messages. In: The Rust Programming Language Blog. Retrieved September 7, 2017 .