5 ms·
I’ve been using Elm since 0.16. Development is slow and thoughtful. Perhaps 0.19 will be a disaster, but I doubt it. In the meantime 0.18 has been a very produ
by dennisdamenace 9y ago
I’ve been using Elm since 0.16. Development is slow and thoughtful. Perhaps 0.19 will be a disaster, but I doubt it.
In the meantime 0.18 has been a very productive language.
One thing to understand is Evan wants Elm to be a language and not bound to JavaScript. This is the sound motivation behind blocking native packages.
- archgoon 9y agoRust is a language, and it can bind to C libraries. Java can import DLLs and shared libraries. Haskell can do this too. All popular languages that can run on a server can spawn a process and communicate via file descriptors. Useful languages can interop with other languages.
- always_good 9y agoWell, Elm does have interop with Javascript through ports. The mechanism is asynchronous which creates an explicit crash boundary at the expense of a mechanism that is more roundabout than just calling `foo x` when you want to wrap a Javascript library's `lib.foo(x)`. Elm 0.18 and below (not sure what 0.19 is doing, it's not released) has synchronous interop through native modules, but those have been discouraged and documented as "do not use, will change in the future" since the beginning. And you can't easily publish them to the package repository. To say Elm doesn't interop with Javascript is just wrong. You may disagree with Elm's stance on its synchronous interop, but you're just disagreeing with trade-offs. Like all trade-offs, just because someone chose different ones than you doesn't mean they were oblivious to them.
- archgoon 9y agoI'm actually in full agreement that there are many ways to accomplish interop, with a variety of tradeoffs. It is precisely for that reason that I disagree that the statement 'One thing to understand is Evan wants Elm to be a language and not bound to JavaScript.' is a good explanation (or a 'sound motivation') for the current design decision. Thank you for expanding on the goals of the current design. People less familiar with Elm, such as myself, have learned something about Elm's capabilities and strategies for dealing with interop.
- amluto 9y agoI'm a bit surprised that there isn't a Rust-like interface to call Javascript: callJS :: JSFunction -> (JSObject | JSException) Or however you spell it in Elm. Admittedly, if Elm is lazy like Haskell, you need some way to deal with the fact that Javascript functions are impure.