I think "No runtime exceptions" is true except for cases where there are compiler bugs, namely "no errors on incomplete pattern matches" and "no errors on bad self-recursive values". Given these bugs, maybe I am too eager to get to the "greater truth" which is that there really are practically no runtime errors.
Yes, these options would move this into the realm of something doable in the compiler without changing the language’s type system. They are mathematically not nice (== ceases to be a congruence relation), but pragmatically acceptable. In any case, something should be done about this before making any public claims that Elm admits no runtime errors.
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Richard’s 1. option is implemented by this simple fix.
I think it's reasonable to have no runtime errors within a few months, but I think we have to be very careful about making the claim before it's true, since those who are least experienced are the most likely to accidentally cause runtime errors.
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
I’m not seeing people marketing Haskell by claiming it does not have runtime exceptions. Saying that it eliminates lots of runtime errors, or moves them to compile time, etc., maybe even that in practice one usually doesn’t encounter them, yes, but not an unqualified claim that there are no runtime errors at all.
I think the language you use in the 0.15 draft announcement is okay (though Hassan’s list on GitHub shows that one doesn’t have to try that hard to get a runtime error), but this thread here was in reaction to a claim you were proposing for the front page which said that the only way to get a runtime error in Elm is by explicitly calling crash. That was a very literal claim which is easily refuted. (And would likely end up being refuted and thrown in your/our face on Hacker News etc.)
For me, part of the reason for the qualifying it now is that, within a week or so, I'll be finished the pattern match checker. I think we could probably have it merged in 0.16, when the claim would be literally true, except for compiler bugs, native bugs, or running out of resources.
...having said all that, I suppose it wouldn't be the end of the world if the language were "Pretty much the only way to get a runtime exception in Elm" instead of "The only way to get a runtime exception in Elm" ;)
--
Others’ experience can be different, specifically beginners’ experience. Maybe read this thread up to the end. I remember at least one other problem that came to the list as “my code stops running” which ultimately boiled down to the same issue as in that thread. You must be a very disciplined programmer if you never forget to handle some case in a pattern match. But it is that discipline, not (currently) Elm per se, which saves you there.
All the more reason to hope that Joey’s totality checker will be a success!
The number is zero. :) I have yet to write any Elm code that throws a runtime exception.
The number for CoffeeScript? Enormous, as per usual for that sort of development, but I have not been keeping track. It's not like you can get bigger than an infinityfold increase, though.