No Runtime Exceptions
Elm uses type inference to detect corner cases and give friendly hints. NoRedInk switched to Elm about four years ago, and 300k+ lines later, they still have not had to scramble to fix a confusing runtime exception in production. Learn more.
-- TYPE MISMATCH ---------------------------- Main.elm The 1st argument to `drop` is not what I expect: 8| List.drop (String.toInt userInput) [1,2,3,4,5,6] ^^^^^^^^^^^^^^^^^^^^^^ This `toInt` call produces: Maybe Int But `drop` needs the 1st argument to be: Int Hint: Use Maybe.withDefault to handle possible errors.