Elm (programming language): Difference between revisions

Content deleted Content added
m References: no fixed col nos
Dukese805 (talk | contribs)
misc
Line 5:
| logo = [[File:Elm logo.svg|120px|The Elm tangram]]
| paradigm = [[Functional programming|Functional]]
| released = {{Start date and age|2012|3|30}}<ref name="initialrelease">{{cite web|url=https://www.reddit.com/r/haskell/comments/rkyoa/my_thesis_is_finally_complete_elm_concurrent_frp/|last1=Czaplicki|first1=Evan|title=My Thesis is Finally Complete! "Elm: Concurrent FRP for functional GUIs"|website=[[Reddit]]|date=30 March 2012}}</ref>
| latest release version = 0.19.1
| latest release date = {{Start date and age|2019|10|21}}<ref>{{Cite web|url=https://github.com/elm/compiler/releases|title = Releases · elm/Compiler| website=[[GitHub]] }}</ref>
| influenced_by = [[Haskell (programming language)|Haskell]], [[Standard ML]], [[OCaml]], [[F Sharp (programming language)|F#]]
| influenced = [[Redux (JavaScript library)|Redux]],<ref>{{cite web|url=https://redux.js.org/introduction/prior-art|title=Prior Art - Redux|website=redux.js.org}}</ref> [[Rust (programming language)|Rust]],<ref>{{Cite web |title=Uniqueness Types |url=https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html |access-date=2016-10-08 |website= Rust Blog |quote="Those of you familiar with the Elm style may recognize that the updated --explain messages draw heavy inspiration from the Elm approach."}}</ref> [[Vue.js#Official libraries|Vue]],<ref>{{cite web|url=https://vuejs.org/v2/guide/comparison.html#Scale|title=Comparison with Other Frameworks — Vue.js}}</ref> Roc,<ref>{{Cite web |title=roc/roc-for-elm-programmers.md at main · roc-lang/roc |url=https://github.com/roc-lang/roc/blob/main/roc-for-elm-programmers.md |access-date=2024-02-17 |website=[[GitHub]] |language=en |quote="Roc is a direct descendant of the Elm programming language. The two languages are similar, but not the same!"}}</ref> Derw,<ref>{{cite web| title= Why Derw: an Elm-like language that compiles to TypeScript? |url= https://derw.substack.com/p/why-derw-an-elm-like-language-that}}</ref> Gren<ref>{{cite web| title= Gren 0.1.0 is released |url= https://gren-lang.org/news/220530_first_release/}}</ref>
| typing = [[static typing|Static]], [[strong typing|Strong]], [[type inference|Inferred]]
| designer = Evan Czaplicki
Line 20:
 
== History ==
Elm was initially designed by Evan Czaplicki as his thesis in 2012.<ref>{{cite web|url=https://elm-lang.org/assets/papers/concurrent-frp.pdf|title=Elm: Concurrent FRP for Functional GUIs}}</ref> The first release of Elm came with many examples and an online editor that made it easy to try out in a [[web browser]].<ref>{{cite web|url=https://elm-lang.org/try|title=Try Elm|website=elm-lang.org|access-date=2019-07-24|archive-url=https://web.archive.org/web/20170521144831/http://elm-lang.org/try|archive-date=2017-05-21|url-status=dead}}</ref> Mr. Czaplicki joined [[Prezi]] in 2013 to work on Elm,<ref>{{cite web|url=https://elm-lang.org/news/elm-and-prezi|title=elm and prezi|website=elm-lang.org}}</ref> and in 2016 moved to [[NoRedInk]] as an Open Source Engineer, also starting the Elm Software Foundation.<ref>{{cite web|url=https://elm-lang.org/news/new-adventures-for-elm|title=new adventures for elm|website=elm-lang.org}}</ref>
 
The initial implementation of the Elm compiler targeted [[HTML]], [[Cascading Style Sheets|CSS]], and [[JavaScript]].<ref>{{cite web|url=https://github.com/elm/compiler|title=elm/compiler|website=GitHub|date=16 October 2021}}</ref> The set of core tools has continued to expand, now including a [[Read-eval-print loop|REPL]],<ref>{{cite web|url=https://elm-lang.org/news/repl|title=repl|website=elm-lang.org}}</ref> [[Package management system|package manager]],<ref>{{cite web|url=https://elm-lang.org/news/package-manager|title=package manager|website=elm-lang.org}}</ref> time-travelling debugger,<ref>{{cite web|url=https://elm-lang.org/news/time-travel-made-easy|title=Home|website=elm-lang.org}}</ref> and installers for macOS and Windows.<ref>{{cite web|url=https://guide.elm-lang.org/install.html|title=Install|website=guide.elm-lang.org}}</ref> Elm also has an ecosystem of [https://package.elm-lang.org/packages/ community created libraries] and [https://ellie-app.com Ellie], an advanced online editor that allows saved work and inclusion of community libraries.
Line 71:
Elm does not support [[Type class#Higher-kinded polymorphism|higher-kinded polymorphism]],<ref>{{cite web|title=Higher-Kinded types Not Expressible? #396|url=https://github.com/elm-lang/elm-compiler/issues/396|website=github.com/elm-lang/elm-compiler|access-date=6 March 2015}}</ref> which related languages [[Haskell (programming language)|Haskell]] and [[PureScript]] offer, nor does Elm support the creation of [[type class]]es.
 
This means that, for example, Elm does not have a generic <code>map</code> function which works across multiple data structures such as <code>List</code> and <code>Set</code>. In Elm, such functions are typically invoked qualified by their module name, for example calling <code>List.map</code> and <code>Set.map</code>. In Haskell or PureScript, there would be only one function <code>map</code>. This is a known feature request that is on Mr. Czaplicki's rough roadmap since at least 2015.<ref>{{cite web|title=Higher-Kinded types Not Expressible #396|url=https://github.com/elm/compiler/issues/396#issuecomment-128190898|website=github.com/elm-lang/elm-compiler|access-date=19 November 2019}}</ref>
 
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<ref>{{cite web|title=Main.elm|url=https://github.com/rtfeldman/elm-spa-example/blob/23dee34dd7a8c26229a03bc8e9f0e034f6222f13/src/Main.elm|website=github.com/rtfeldman/elm-spa-example|access-date=30 June 2020}}</ref> with almost identical fragments being repeated in update, view, subscriptions, route parsing and building functions.