[Haskell-beginners] Just how unsafe is unsafe
aslatter at gmail.com
Fri Feb 6 07:00:21 EST 2009
On Thu, Feb 5, 2009 at 3:11 PM, Andrew Wagner <wagner.andrew at gmail.com> wrote:
> So we all know the age-old rule of thumb, that unsafeXXX is simply evil and
> anybody that uses it should be shot (except when it's ok).
> I understand that unsafeXXX allows impurity, which defiles our ability to
> reason logically about haskell programs like we would like to. My question
> is, to what extent is this true?
Tangential to all of this - sometimes my unsafeXXX functions are pure,
but partial. So I'll have:
foo :: a -> b -> Maybe c
unsafeFoo :: a -> b -> c
More information about the Beginners