A question about run-time errors when class members are undefined

Cale Gibbard cgibbard at gmail.com
Mon Oct 1 09:19:44 UTC 2018


This and the fact that you may leave record fields unspecified when
initially constructing a record are two things I'd probably change if I
could. In the rare case of a class with a method that will usually be an
error, you could still define that as the default method implementation in
the class.

On Mon, Oct 1, 2018, 04:36 Jurriaan Hage, <J.Hage at uu.nl> wrote:

> Hello,
>
> We are adding classes and instances to Helium.
>
> We wondered about the aspect that it is allowed to have a class instance
> of which not all fields have a piece of code/value associated with them,
> and
> that as a result when you happen to call these, a run-time error results.
>  (see Sec. 4.3.2 of the Haskell 2010 report).
>
> Does anyone know of a rationale for this choice, since it seems rather
> unhaskell-like.
>
> best,
> Jur
>
> _______________________________________________
> Haskell-prime mailing list
> Haskell-prime at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-prime/attachments/20181001/8d6b529c/attachment.html>


More information about the Haskell-prime mailing list