Category:Elm: Difference between revisions
Content added Content deleted
(As of version 0.16, fields can no longer be added or deleted from records, so I've removed the word "extensible" (source: http://elm-lang.org/blog/compilers-as-assistants#simplified-records)) |
(Remove mentions to reactive (Elm >= 0.17)) |
||
Line 8: | Line 8: | ||
}} |
}} |
||
'''Elm''' is a programming language for developping browser-based applications and graphical user interfaces that strictly adheres to the functional |
'''Elm''' is a programming language for developping browser-based applications and graphical user interfaces that strictly adheres to the functional paradigm. This means that Elm does not rely on mutability or destructive updates. |
||
In order to run web applications, Elm compiles to Javascript, HTML, and CSS. Functional |
In order to run web applications, Elm compiles to Javascript, HTML, and CSS. The Functional model-view-update architecture is used in lieu of event handlers and callbacks. For right markup, Elm allows to embed Markdown directly in the language. |
||
Elm's syntax closely resembles that of Haskell while influenced by OCaml, FSharp, and Javascript. Unlike Haskell, Elm's "has type" operator is written with a single colon and borrows the application operators (<|) and (|>) from FSharp. From Javascript, Elm borrows the idea of JSON-like objects which it turns into records. These are type-safe objects whose fields are accessible with a (.) operator. This means that records in Elm have the flexibility of Javascript objects minus their unpredictable dynamism. |
Elm's syntax closely resembles that of Haskell while influenced by OCaml, FSharp, and Javascript. Unlike Haskell, Elm's "has type" operator is written with a single colon and borrows the application operators (<|) and (|>) from FSharp. From Javascript, Elm borrows the idea of JSON-like objects which it turns into records. These are type-safe objects whose fields are accessible with a (.) operator. This means that records in Elm have the flexibility of Javascript objects minus their unpredictable dynamism. |
||
Similar but not quite like Haskell's Monads, Signals are the way of introducing side-effects in Elm. While (for example) an "Int" does not have a mutable state, a "Signal Int" does. |
|||
{{language programming paradigm|Functional}} |
{{language programming paradigm|Functional}} |