Elm Lang

Anyone a bit experimented in front end dev who tried elmlang and javascript and its libraries?
What are the main differences, pros, and cons?

bump

Elm is beautiful, go for it.
You need some understanding about functional programming, though..

It's a language not built upon shit.

And it's going to teach you functional programming too.

Go for it.

wtf is that a tangram?

type alias Skinfolds =
{ armpit : Maybe Float
, subscapular : Maybe Float -- shoulder blade
, chest : Maybe Float
, triceps : Maybe Float
, biceps : Maybe Float
, abdomen : Maybe Float
, iliacCrest : Maybe Float -- Hip
, thigh : Maybe Float
, calf : Maybe Float
}
This indentation style triggers me

It's the agreed upon standard so theres no bike-shedding.
I personally dont use it or elm-format.
Though im starting to like their comma placement more than trailing.

elm compiles to javascript and can use javascript libraries through the ports functionality. it's very nice, but far from finished. the compiler messages are already 100% the best I've ever seen in any language though.
in practice, typescript+react+mobx combo suits me fine for this sort of thing and I'm more productive in it, so I don't plan on using elm for any larger project. and honestly I don't think it will ever become much more popular than it is right now.

>lang

Which is better for Front-End Development, Vue.js or Elm Language?

> compiles to javascript
Web devs are so special they have to repeat every language design mistake since punch cards went out of style.

I tried it.

Tbh user, front end just sucks, it sucks in all fronts.

My top pick is ScalaJS, but the support is not the best.

How would one run it in a browser?

Elm is thoroughly satisfying to write in, but it tends to break with updates.

>badly remaking a bad language to use a worse language as a platform

dude what could possibly go wrong lmao

Works out much better than trailing commas in practice. Looks like cancer for a day or two before you get used to it.

By implementing it as a library in JS, possibly with a GUI builder style meta-object compiler if you really have to, or write an interpreter in JS.

The real answer is "not at all" because any JS framework that requires this degree of indirection is a dumbfuck idea.

Elm is not a library, it's a separate language. You could write an LLVM backend for it if you wanted to.

Compiled javascript is a lot more faster than interpreted code on the fly, and 0% prone to errors.

I'm more likely to join a project based on Elm than a project with 100k lines of vanilla Javascript wrote in the previous decade.

s/wrote/written/

>and 0% prone to errors
Not really. There are some known ways to cause exceptions in pure Elm, but you'd have to be pretty retarded or doing very weird shit to encounter one by accident. Divide by zero is probably the most likely one to ever happen.