4 ms·
A big difference seems to be that it can run on NodeJS. I was a bit confused that the Hello World example shows a web app, but the compiler itself is being rewr
by brabel 2y ago
A big difference seems to be that it can run on NodeJS.
I was a bit confused that the Hello World example shows a web app, but the compiler itself is being rewritten in Gren?! So, the compiler can spit out an executable or JS code, besides HTML?
- Skinney 2y agoIt can. If you pass the compiler a output name that has no extension it will produce an executable (js with shebang), and if it has a .js extension it will output a pure js file.
- mjaniczek 2y agoTo clear a possible confusion: Elm runs on NodeJS as well. The reason it's not often done is that the (1st/3rd-party) published packages are heavily skewed towards frontend, because Elm is a language primarily focused on frontend and most of the community uses it for that.
- brabel 2y agoElm is a frontend language. I know there are efforts to make it runnable on node, but to my knowledge, officially the language is only meant for web applications. The website still seems to confirm that. Can you explain a bit better what you mean??
- Latty 2y agoIIRC Lamdera is doing server-side Elm. https://lamdera.com/ https://lamdera.com/
- pyrale 2y agoThe historic elm library for unittests does emit js code meant to run on node. There is also a cottage industry of applications in elm that don’t target the browser like elm-review, and applications running elm code without using its js output, like elm-test-rs. These are made possible by the relative simplicity of elm’s syntax and semantics, which mean getting a workable ast is easy.