News for hackers. Stuff that matters.
Re:Simon Peyton Jones – Haskell Foundation Podcast by massysett on Sunday October 16, 2022 @08:45PM (#33228656)
I guess that would be nice, but no, I’ve never heard of anything like that.

“error” is simply bottom. Bottom is an inhabitant of every Haskell type. There’s no straightforward way to just turn it off.

Re:Simon Peyton Jones – Haskell Foundation Podcast by renox on Monday October 17, 2022 @10:06AM (#33233673)
Looks like the null-pointer mistake no?
Re:Simon Peyton Jones – Haskell Foundation Podcast by foldr on Monday October 17, 2022 @02:49PM (#33237937)
Bottom has to be a member of every type because functions aren't guaranteed to terminate, so there's no really any way around that within the confines of a general purpose programming language.

That admittedly doesn't entail that Haskell ought to have special functions like 'error' that invite the programmer to explicitly introduce bottom values as a mechanism of signaling errors. However, in the real world, executing any function may raise an exceptional condition at any time (e.g. an out of memory error), regardless of programming language.

Re:Simon Peyton Jones – Haskell Foundation Podcast by renox on Wednesday October 19, 2022 @04:53PM (#33267794)
> Bottom has to be a member of every type because functions aren't guaranteed to terminate,

I don't understand: if the function you called doesn't terminate then you're blocked so I don't see why this should impact the types..

Re:Simon Peyton Jones – Haskell Foundation Podcast by foldr on Thursday October 20, 2022 @06:29AM (#33272740)
More info here: https://wiki.haskell.org/Bottom As bottom is the value of a non-terminating computation and a computation of any type may fail to terminate, bottom must inhabit all types. The same goes for 'error'.