5 ms·
They're both very functional, but it's an interesting matchup given that Elm is very strongly typed and (according to my understanding) Elixir is totally dynami
by kcorbitt 10y ago
They're both very functional, but it's an interesting matchup given that Elm is very strongly typed and (according to my understanding) Elixir is totally dynamic. For those who are developing with both, I'd be interested in hearing if there's a reason why types would be more useful on the client than the server or whether there's another motivation for those particular choices.
- knewter 10y agoI'm glad to dive in. On the client, fault tolerance is basically not a concern of mine. On the server, it's the most important concern. I find it more useful to think of Elixir as a highly concurrent language built for fault tolerance, where Functional Programming was a necessary requirement to get there. Jose has a great post on this here: http://blog.plataformatec.com.br/2016/05/beyond-functional-programming-with-elixir-and-erlang/ http://blog.plataformatec.com.br/2016/05/beyond-functional-p...
- skybrian 10y agoBrowsers have fault tolerance built in: the reload button.
- knewter 10y agoIf you want some more fun, you should check out this: http://package.elm-lang.org/packages/elm-lang/core/4.0.1/Process http://package.elm-lang.org/packages/elm-lang/core/4.0.1/Pro... (see the last paragraphs). I am hopeful that we will see an Elm backend running on the BEAM eventually.
- im_down_w_otp 10y agoLook at Dialyzer and http://elixir-lang.org/getting-started/typespecs-and-behaviours.html#types-and-specs http://elixir-lang.org/getting-started/typespecs-and-behavio... Also, Elixir community... there seems to be a paucity of awareness of Dialyzer and Typespecs. Perhaps they could be more prominent? They're included in the reference docs, but not really so much in a way that indicates what they are or how one would use them when writing their own software in Elixir. There are many, many classes of problems that can be discovered before they're discovered at runtime. It's made a little harder in Elixir-land due to limited Map support in Dialyzer and Map usage being extremely common in Elixir code, but still spec'ing your functions is a good practice and habit to get into anyway.
- knewter 10y agoThe latest Erlang release fixed the Map problem with Dialyzer. It was entirely the reason I was lax with specs. I'd love to get a workflow more like this one: https://medium.com/@barruumrex/seeking-simple-satisfaction-2a098902ddff https://medium.com/@barruumrex/seeking-simple-satisfaction-2...
- im_down_w_otp 10y agoFor the uninitiated... Erlang 19's included Dialyzer improves the scenario of type-checking maps in useful ways. Namely that now you can represent an empty map, an arbitrary map of any type, and a partially arbitrary map which must include certain key type and value type associations but is not limited to those. Which leaves out one representation which is a map which includes and only includes a specific set of key type and value type associations. Erlang 18's Dialyzer has basically just #{} =:= map() which is equivalent to the union of #{none() => none()} and #{any() => any()}, so it was basically a giant escape hatch in the type-checking system, and thus not particularly valuable. Looking forward to a pending change in laxness as a result of the coming changes in 19. :-)
- corysama 10y agoI think the static/dynamic client/server split is more coincidence than brilliance. Elm and Elixir are like two neighborhood kids growing up together as best buddies. They are both new, functional, webby languages with communities that are very friendly and very interested in inventing new ways to make programming better. It's natural that both groups would be excited about working together.