Content deleted Content added
→Limits: Including other implementations of TEA pattern |
m v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation) |
||
Line 75:
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]], [[Scala (programming language)|Scala]] 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> On the other hand, implementations of TEA pattern in advanced languages like [[Scala (programming language)|Scala]] does not suffer from such limitations and can benefit from [[Scala (programming language)|Scala]]'s type classes, [[Type-level programming|type-level]] and [[Kind (type theory)|kind-level]] programming constructs.<ref>{{Cite web |title=The Elm Architecture |url=https://tyrian.indigoengine.io/03-architecture/the-elm-architecture/ |access-date=2024-09-07 |website=tyrian.indigoengine.io}}</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.
|