default instance for IsString

Yitzchak Gale gale at sefer.org
Tue Apr 24 16:03:05 CEST 2012


Daniel Peebles wrote:
> Why are potentially partial literals scarier than the fact that every value
> in the language could lead to an exception when forced?

That's a legitimate question, but it's strange to hear it from
you.

People ask that same question about Haskell's static
type system. Why bother? Every value could lead to an
exception when forced. So we might as well check
everything at run time.

Wouldn't it be ironic if the one thing that every language
other than Haskell is able to check at compile time,
namely the static syntax of string literals, could only be
checked at run time in Haskell? Especially when, with just
a little care, we could easily continue to check it at compile
time while still supporting string literals of type Text
and ByteString.

I guess I'm just not understanding your question.

Thanks,
Yitz



More information about the Glasgow-haskell-users mailing list