Version française
Home     About     Download     Resources     Contact us    
Browse thread
Void type?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Markus Mottl <markus.mottl@g...>
Subject: Re: [Caml-list] Re: Void type?
On 7/31/07, Chris King <colanderman@gmail.com> wrote:
> Personally I would use the second.  That way, when you come across a
> void value (say, in pattern matching a variant), you can take care of
> that match case without resorting to "assert false" (whether directly
> or via void_elim):

This is the exact reason why I used this solution: the compiler
essentially proves to you that this branch will never be taken,
because it is impossible to create a value that is a member of any
type (without black magic, that is).  This is important if you want to
check your code for uncaught exceptions, especially if you eventually
want to do this mechanically.

Regards,
Markus

-- 
Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com