Live data from Hacker News

A nice app on Elm street

madewithlove.be

11–20 of 84 posts

Re: A nice app on Elm street

#11
For anyone new trying to get into Elm (as a language/tool), I would look elsewhere. ReasonML, PureScript, TypeScipt, etc are all better featured solutions. Having said that, the article is well written and thorough for anyone wanting to take a look into Elm.

But there are massive problems with Elm itself which make it impossible to consider seriously. I have and still do use Elm in production, and went through the nightmare upgrade from 0.18 to 0.19.

1. Elm ports are not sound. Elm will tell you everything is good but doesn't do simple checks - as say PureScript does - to see if your port code actually exists or adheres to the defined contract. There are other tree-shaking issues, but Elm does not know and does not care about the js you've written.

2. Evan holds the naive view that everything can be rewritten in pure Elm and there's no reason not to. An overwhelmingly common use-case is 3rd party services or tracking libraries where it's impossible to re-implement; these apparently don't exist.

3. Elm applications, without a Redux-style (domain-specific to Translator) pattern, end up being horrendous spaghetti code of everything knowing about everything. Cmds and Tasks are a pain to work with when they should be interoperable in some manner.

For small embeddable or personal projects Elm is a fun tool. I don't see it being more than that until more community involvement is permitted - removing the dictatorship.

Re: A nice app on Elm street

#12

> But you will still hit regular road-blocks which learning it because of how alien some of its paradigms are when coming from Javascript. I always found this to be a weird take. Elm is "Maybe Not As Good" because the average JavaScript developer isn't immediately familiar with it? Maybe we should just be less averse to learning new things, and I don't think simple syntax swaps really count as new things. Unrelated:…

I didn't mean that only Javascript developers would be lost, more that Elm kind of "does its own thing" and as such some of its errors or mechanics can be a bit cryptic and require some more experience with the language. It's not a language you can pick up and go as easily as Javascript is more what I meant, in my opinion at least unless, you're already familiar with pure and strictly typed languages.

I don't think Elm does its own thing. The ideas used in Elm are more "discovered" than "invented" (at least relative to JavaScript), if you're familiar with that line of thinking.

I also don't think its errors are cryptic. Elm's error messages are best in class.

> It's not a language you can pick up and go as easily as Javascript

I don't agree with this either. After having taught people Elm, and also JavaScript as a first language, I don't think mutability is more intuitive to a beginner.

Re: A nice app on Elm street

#16

Are mere users still not allowed to interface with JS from Elm? I lost all interest when that came down.

You mean ports and flags? It's described right in the tutorial : https://guide.elm-lang.org/interop/ports.html. I wouldn't call it not possible. It is necessary to have the cool stuff of Elm, unfortunately (or not).

It's not rocket science tough, and it allows for clean interfaces. I wrote about it just a couple ago ago : https://lengrand.fr/a-short-introduction-to-ports-and-flags-...

Re: A nice app on Elm street

#17

Are mere users still not allowed to interface with JS from Elm? I lost all interest when that came down.

JS interop has never been an issue, it's publishing JS-interop packages which is gated[0]: port module is available in applications but not packages.

[0] formerly behind a review queue / review process to add to native-whitelist, now limited to two specific "core" organisations

Re: A nice app on Elm street

#18
post #15

Are mere users still not allowed to interface with JS from Elm? I lost all interest when that came down.

I don't think there will ever be a way to interface js directly from elm or vise versa. Ports are the only way.

Ha, OP meant directly? Well AFAIK that is simply not possible, to keep the purity of Elm programs. All has to go through the Elm architecture. Or am I mistaken?

Re: A nice app on Elm street

#19
I am a back-end developer, and I don't know front-end. I also know very little of functional programming.

Elm is the only language that I like writing, and where I don't feel in a state of frustration when I write. It might have a lot of limitations, bu tit makes me happy. Given that our job is basically to be in a constant state of half broken code, this makes me a huge fan of the language.

Post reply on HN