Anyone a bit experimented in front end dev who tried elmlang and javascript and its libraries?
What are the main differences, pros, and cons?
>>62136290
Elm is beautiful, go for it.
You need some understanding about functional programming, though..
>>62136290
It's a language not built upon shit.
And it's going to teach you functional programming too.
Go for it.
>>62136290
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
>>62139166
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.
>>62136290
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?
>>62139415
> compiles to javascript
Web devs are so special they have to repeat every language design mistake since punch cards went out of style.
>>62136290
I tried it.
Tbh anon, front end just sucks, it sucks in all fronts.
My top pick is ScalaJS, but the support is not the best.
>>62140925
How would one run it in a browser?
>>62136290
>>62140858
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
>>62139166
Works out much better than trailing commas in practice. Looks like cancer for a day or two before you get used to it.
>>62141251
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.
>>62142284
Elm is not a library, it's a separate language. You could write an LLVM backend for it if you wanted to.
>>62142284
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.
>>62142349
s/wrote/written/
>>62142349
>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.