Nick Smith
02/07/2021, 12:05 AMBreck Yunits
02/07/2021, 12:23 AMBreck Yunits
02/07/2021, 12:23 AMBreck Yunits
02/07/2021, 12:24 AMNick Smith
02/07/2021, 12:27 AMbmitc
02/07/2021, 12:28 AMbmitc
02/07/2021, 12:30 AMbmitc
02/07/2021, 12:33 AMNick Smith
02/07/2021, 12:50 AMI'd love a language that specifically separated functions between those that can and cannot return errors.Most functions beyond the identity function and constants can return errors: you simply have to pass them a value that is not part of their domain π. Sometimes the domain is tricky: for example the div instruction takes all numeric divisors apart from zero, and it's often hard to statically verify that zero won't be given. That's perhaps the simplest use-case for an "undefined" return value. But if a value is explicitly considered part of the domain, yet can still induce some "error-like" result (for example, failure to pass a JSON string), then I agree they should probably return a specific error value that distinguishes this class of error from the more general "I passed a string to a function expecting an integer" undefined result.
Nick Smith
02/07/2021, 2:09 AMAndrew F
02/07/2021, 2:13 AMAndrew F
02/07/2021, 2:21 AMNick Smith
02/07/2021, 2:22 AMNick Smith
02/07/2021, 2:24 AMDan Cook
02/07/2021, 5:40 AMDan Cook
02/07/2021, 5:57 AMChris Knott
02/07/2021, 9:12 AMHarry Brundage
02/07/2021, 9:52 PMAndrew F
02/07/2021, 10:04 PMNick Smith
02/08/2021, 1:22 AMNick Smith
02/08/2021, 1:23 AMDan Cook
02/08/2021, 8:24 AMBreck Yunits
02/08/2021, 4:42 PMNick Smith
02/09/2021, 2:39 AMelbear
02/09/2021, 10:16 AMDan Cook
02/10/2021, 6:51 AMDan Cook
02/10/2021, 7:11 AM