3 ms·
My experience with Elm was very short and rather funny: a programmer I vaguely know approached me (on Twitter?) and with the usual zealotry of functional progra
by gregopet 4y ago
My experience with Elm was very short and rather funny: a programmer I vaguely know approached me (on Twitter?) and with the usual zealotry of functional programmers started convincing me "You just have to try this language out, it's the best, and they've made it IMPOSSIBLE to get a runtime error!"
Now I don't believe in miracles, the Easter bunny or code that has no way of failing, but I said fine, JS can be terrible (it was even more so I'm those days), so I googled the project webpage, opened it and WHAM, blank page, with only "Error: database connection not available" or something like that written on it. Let me tell you, I laughed so hard as I was closing the tab! And while I'm sure it was just extremely bad luck, I never looked at the project again. They had their chance, and maybe don't make bold promises you can't keep?
- karmakaze 4y agoYou realize that Elm is for Frontend, right? It doesn't prevent backend runtime errors. Edit: When I see errors like this, I think it's gaining some interest/popularity and try to remember to come back later.
- napsterbr 4y agoI'm sorry for being blunt, but if you are mistaking a database server being down (or CDN issues, or faulty backend code, or...) with the frontend code misbehaving then either you are very ignorant to how "computers" work or you are being (very) intellectually disonest. Don't do that. For the record: yes, as much as it may sound bold or marketing-y, the statement is mostly true. You can have runtime errors if you write a bad regex though. After almost 3 years working full-time with Elm on a daily basis, I have not faced a single runtime error. And by the way, this is coming from someone who moved away from Elm for the same reasons mentioned throughout this thread, so I'm definitely not an "Elm fan boy", but I do vouch for this programmer's statement.
- gregopet 4y agoI'm not ignorant of the difference, but at the end of the day, what's the difference? It was definitely Elm throwing that error and they certainly weren't adding "well, for the frontend part anyway, you're out of luck for the rest, lol". And even if we stay on the frontend, I've been doing web development for a long long time and I've seen some weird things. Are you telling me that Elm will catch the user's local storage becoming full? An AJAX URL being blacklisted? Chromium playing tricks with your DOM because it found a field entitled "username"? You have to catch all these things, like in every other language. Sure, the mechanism may differ; you may have Java style mandatory exceptions, or Go style error status that you can check. It may be done reasonably better than with competing languages. But there are no magic bullets and I don't appreciate being mislead that there are, and _certainly_ not with a holier than thou attitude. I'm not saying Elm is bad, I was merely recounting a personal anecdote that for better or for worse prevented me from experiencing Elm.