# Is Elm fitting for me?

**URL:** <https://discourse.elm-lang.org/t/is-elm-fitting-for-me/5845>\
**Category:** Learn\
**Created:** [May 26, 2020, 11:04am UTC](https://discourse.elm-lang.org/t/is-elm-fitting-for-me/5845 "2020-05-26T11:04:13Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qws](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/qws/32/3308_2.png) [@Qws](https://discourse.elm-lang.org/u/Qws)\
**Post date:** [May 26, 2020, 11:04am UTC](https://discourse.elm-lang.org/t/is-elm-fitting-for-me/5845/1 "2020-05-26T11:04:13Z")

</div>

I’m looking to build a “game-story dialog” editor, data gets stored in JSON file, the JSON should be manipulated by friendly GUI Elm app with dropdown menus, radio buttons, textlabel, inputboxes, scrollbars etc to create more editable storyboards and substories. You know, it’s basically just a tool to write stories in a glorified story diagrams or in other simple GUI format.

At some point it has to become a PWA (not high priority), but I don’t want it to be a browser only thing forever.

My problems:

- I’m complete beginner in Functional Programming. (Programming language I “master” are GDscript (Python dialect), Javascript, C#… I tried to get into F# and Haskell but I find no reasons for the effort.

That leads to next fear:

- I would like to build webapp rather quickly, I don’t want to spend months (or even years) learn Functional Programming to learn another month(s) to learn Elm. Can I just learn and use Elm comfortably and productively in matter of weeks, or is there some long road ahead?

I have a somewhat experience with React but I’m eager to try a new better/framework to main, it’s going to be Svelte or Elm… or React, but I’m not a fan of “you have 30 framework addons (routing) to solve the problem X”.

---

<div class="post-metadata">

**Author:** ![Lucas\_Payr](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/lucas_payr/32/4993_2.png) [@Lucas\_Payr](https://discourse.elm-lang.org/u/Lucas_Payr)\
**Post date:** [May 26, 2020, 11:18am UTC](https://discourse.elm-lang.org/t/is-elm-fitting-for-me/5845/2 "2020-05-26T11:18:11Z")

</div>

I would say that it should be quite easy to learn and to get started. The only problem I see is that having a lot of GUI elements can result in a lot of boilerplate code that lets the size of the project explode. I realize more and more that this actually also happens in other languages, you most often just don’t notice it as much and then suddenly you have a lot of weird bugs.

* * *

**You want something quick and dirty?** Then don’t use Elm.  
**You want to really understand how FP works?** Then use Elm.

---

<div class="post-metadata">

**Author:** ![Qws](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/qws/32/3308_2.png) [@Qws](https://discourse.elm-lang.org/u/Qws)\
**Post date:** [May 26, 2020, 11:37am UTC](https://discourse.elm-lang.org/t/is-elm-fitting-for-me/5845/3 "2020-05-26T11:37:40Z")

</div>

> [@Lucas\_Payr](#):
>
> **You want something quick and dirty?** Then don’t use Elm.

Interesting quote :))

I hope it’s possible to make something quick when you are “fluent” with Elm!

> [@Lucas\_Payr](#):
>
> The only problem I see is that having a lot of GUI elements can result in a lot of boilerplate code that lets the size of the project explode. I realize more and more that this actually also happens in other languages, you most often just don’t notice it as much and then suddenly you have a lot of weird bugs.

True, the bigger the application the more code is involved, It’s inevitable. But I believe Elm splits code base in modules/components as well right, similar fashion as React does? Or… not?

---

<div class="post-metadata">

**Author:** ![Lucas\_Payr](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/lucas_payr/32/4993_2.png) [@Lucas\_Payr](https://discourse.elm-lang.org/u/Lucas_Payr)\
**Post date:** [May 26, 2020, 11:45am UTC](https://discourse.elm-lang.org/t/is-elm-fitting-for-me/5845/4 "2020-05-26T11:45:35Z")

</div>

Yes you are right. You can use modules. But when it comes to GUI elements, putting them into their own module introduces even more boilerplate.

[The Elm community does not like Components, because it often overcomplicates things.](https://gist.github.com/rofrol/fd46e9570728193fddcc234094a0bd99#reusable-views-instead-of-nested-components)

---

<div class="post-metadata">

**Author:** ![pd-andy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/pd-andy/32/4145_2.png) [@pd-andy](https://discourse.elm-lang.org/u/pd-andy)\
**Post date:** [May 26, 2020, 3:28pm UTC](https://discourse.elm-lang.org/t/is-elm-fitting-for-me/5845/5 "2020-05-26T15:28:19Z")

</div>

UI elements do not have to be stateful components. It’s totally reasonable to have a module for a view element and _not_ need to recreate TEA. I often have:

```
module Ui.SomeElement exposing (view, Events, Data)

import Html exposing (Html)
...

type alias Events msg =
  { foo : msg
  , bar : String -> msg
  , baz : Int -> String -> msg
  }

type alias Data =
  { title : String
  , id : Int
  , somethingElse : String
  }

view : Events msg -> Data -> Html msg
view events data =
  ...

```

This works fine for many things. And honestly, there’s a brief complexity and conceptual cost when adding a stateful component to your project, but once you’ve paid that cost you only pay again in a little bit (more) boilerplate for everything else.

---

<div class="post-metadata">

**Author:** ![berend](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/berend/32/2250_2.png) [@berend](https://discourse.elm-lang.org/u/berend)\
**Post date:** [May 26, 2020, 10:48pm UTC](https://discourse.elm-lang.org/t/is-elm-fitting-for-me/5845/6 "2020-05-26T22:48:05Z")

</div>

Start with [elm create app](https://github.com/halfzebra/create-elm-app), that gets the PWA basics done.

And I would say with Elm you can iterate very fast, as you don’t have to spend time debugging. Just like you I learned functional programming through Elm, and I’m very grateful to Evan for creating a language to make FP accessible.

---

<div class="post-metadata">

**Author:** ![albertdahlin](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/albertdahlin/32/868_2.png) [@albertdahlin](https://discourse.elm-lang.org/u/albertdahlin)\
**Post date:** [May 27, 2020, 2:03pm UTC](https://discourse.elm-lang.org/t/is-elm-fitting-for-me/5845/7 "2020-05-27T14:03:09Z")

</div>

We have been using Elm in my company for some 3 years now. Before that we were mostly working with PHP, React and Javascript.  
Our developers (about 15) were quite productive in Elm after less than a month, without having any previous experience with FP. I would encourage you to try it.

---

<div class="post-metadata">

**Author:** ![Qws](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/qws/32/3308_2.png) [@Qws](https://discourse.elm-lang.org/u/Qws)\
**Post date:** [May 30, 2020, 10:34am UTC](https://discourse.elm-lang.org/t/is-elm-fitting-for-me/5845/8 "2020-05-30T10:34:19Z")

</div>

Thank you, I will keep Elm as an option…

Still not confident yet about Elm, do you know the strength of Elm and the disadvantage of Elm compared to React? I would like to know more about that part.

---

<div class="post-metadata">

**Author:** ![wolfadex](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/wolfadex/32/2461_2.png) [@wolfadex](https://discourse.elm-lang.org/u/wolfadex)\
**Post date:** [May 30, 2020, 7:46pm UTC](https://discourse.elm-lang.org/t/is-elm-fitting-for-me/5845/9 "2020-05-30T19:46:16Z")

</div>

I wrote React professionally for 4 years at large and small companies, and Elm professionally for 8 months at a smaller company. I’ve also written both for years with my hobby projects. Given all that, I find myself to be significantly more productive with Elm.

Reasons I would choose React over Elm today would be, in no particular order:

- My team refuses to learn Elm
- I **needed** to use a package that’s specific to React

and that’s it. Everything I’ve ever built in React, could be built in Elm and it would have been easier, faster, and **more maintainable**.

For someone who’s not me another reason to choose React over Elm would be that you need to build your app now and you’re already familiar with React. But if you have time and are willing, I’d definitely recommend Elm over react.

---

<div class="post-metadata">

**Author:** ![ChristophP](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/christophp/32/1528_2.png) [@ChristophP](https://discourse.elm-lang.org/u/ChristophP)\
**Post date:** [June 4, 2020, 1:22pm UTC](https://discourse.elm-lang.org/t/is-elm-fitting-for-me/5845/10 "2020-06-04T13:22:46Z")

</div>

My experience is pretty much exactly what @wolfadex said. The only reasons I would not choose Elm is because people are not willing to learn it, or if there are highly specific requirements which would make intergration hard(I have yet to come across a scenario that could not be adequately worked around with ports or custom elements). Elm helps producing high quality code that is also fun to write. Most React projects I worked on sooner or later became very messy and very risky to refactor.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [June 14, 2020, 1:26pm UTC](https://discourse.elm-lang.org/t/is-elm-fitting-for-me/5845/11 "2020-06-14T13:26:37Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
