5 ms·
I literally have never experienced a bug because of the existence of Math.random(). I don’t think I’ve ever used it outside of a coding interview. Similarly, I
by chickenfries 8y ago
I literally have never experienced a bug because of the existence of Math.random(). I don’t think I’ve ever used it outside of a coding interview. Similarly, I don’t spend time debugging runtime errors caused by document.querySelector()? If I do it’s usually only once when I write the initial query. I don’t understand your last argument: why would I divide by 0?
Everyone’s relationship to their tools of choice has an emotional component. Check out this talk, you might find it interesting:
“The Pervert’s Guide To Programming Languages”
https://youtu.be/mZyvIHYn2zk https://youtu.be/mZyvIHYn2zk
- yakshaving_jgt 8y agoYour logical fallacy is either Personal Incredulity[0], or Anecdotal[1], or both. [0]: https://yourlogicalfallacyis.com/personal-incredulity https://yourlogicalfallacyis.com/personal-incredulity [1]: https://yourlogicalfallacyis.com/anecdotal https://yourlogicalfallacyis.com/anecdotal
- aarpmcgee 8y agoThe core question is, "have you ever experienced a runtime error?" Have you ever spent time debugging a runtime error deployed to production? You can't get those in Elm.
- sawady 8y agoList.tail []
- yakshaving_jgt 8y agotail : List a -> Maybe (List a) Nice try though. https://github.com/elm/core/blob/master/src/List.elm#L548 https://github.com/elm/core/blob/master/src/List.elm#L548
- sawady 8y agoHaha, sorry. You know what I mean, a partial function.
- yakshaving_jgt 8y agoExcept in Elm, the function isn't partial. You're thinking of the partial functions from Haskell's Prelude.
- StreamBright 8y agohttps://medium.com/@eeue56/top-6-ways-to-make-your-elm-app-crash-at-runtime-562b2fa92d70 https://medium.com/@eeue56/top-6-ways-to-make-your-elm-app-c...
- yakshaving_jgt 8y agoYou’ve already posted this. It’s intellectually dishonest to point to implementation bugs as fundamental flaws.
- chickenfries 8y agoThis matters in the real world question of “should I use elm” even if it doesn’t matter to the theoretical question of “is the elm language sound?”. Especially since there is only one implementation of elm that updates very infrequently.
- yakshaving_jgt 8y agoOnly insofar as you would check any technology for how well it’s made generally. After a couple of years running in production, my opinion is that it is well-made generally. Finding clever ways to break a technology isn’t a fair reflection of “real world” use, in my opinion.
- chickenfries 8y agoFair enough. I don’t considering your complaints about Math.random() or division by zero to be a fair reflection of “real world use.”
- StreamBright 8y agoWhat are you talking about? You said no runtime errors because you have pure functions and now it turns out that actually implementation also matters????? Imagine my shock................
- chickenfries 8y agoNo the core question is “does the time and effort spent on those cases justify the cost of switching to elm?” I have to weigh the benefit of no runtime exceptions against things like having to write interop code for libraries that I may have to integrate with. It might make sense for other people. It doesn’t add up for me.
- StreamBright 8y ago>>> I literally have never experienced a bug because of the existence of Math.random(). You must be doing something wrong than. :) The world is impure. Pretending it is not is just laughable. I am saying this and I am actually writing only functional code for living, but I understand when I cannot solve the problem with functional concepts. Few example: - now() - random() - runSqlQuery() - open a file My code might be 90% pure functions but the rest is mutations, handling non-idempotent things, dealing with state, as the world is.
- yakshaving_jgt 8y ago> The world is impure. Pretending it is not is just laughable. Not a single "pure FP zealot" would argue against this. The fact that you imply this again reveals your ignorance. People who know what they're talking about know that you can't model effectful routines with pure functions. That's why a function that gets the current time, or generates some random number, or talks to a database, or talks to the filesystem, has `IO` in the type signature. I have already demonstrated this to you. Perhaps you have some difficulty with reading. FP folks would never pretend a program that has zero effect on the world is useful.