DEV Community

Discussion on: Exploring the Elm Architecture for Web Applications

Collapse
 
starswan profile image
Stephen Dicks

Could you elaborate further on the 'limited libraries' point? Most web apps are very straightforward, and Elm has excellent Javascript interop (via ports) for anything that might be missing which also invalidates point (3) of your 'cons' section. The main downside is probably lack of adoption - its not popular, but it is pretty simple - it has been described as a simple version of Haskell. A lot of JS programmers think they write in functional style, so the concepts shouldn't be that hard either.

Collapse
 
coder_one profile image
Martin Emsky • Edited

More than one book could be written about which programming language (of those that compile to JavaScript) has an excellent interop system for working with the existing JS ecosystem.

The fact is that most people complain about how ports work in Elm.
Another issue is the performance of ports, which are based on the exchange of JSON objects (JSON serialization and deserialization are not costless operations)...

Therefore, to say that Elm has a excellent system for interop with JS is only possible if you don't know languages like Rescript, Gleam, PureScript...

Collapse
 
starswan profile image
Stephen Dicks

Ports don't have to use JSON. They just need encoders and decoders.