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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Vincenzo Ciancia <vincenzo_yahoo_addressguard-gmane@y...>
Subject: Re: '_a
skaller wrote:

> An exception free implementation of List.hd would
> always produce the correct typing:
> 
> let hd x = function
> | [] -> None
> | h :: _ -> Some h
> 
> In effect, Ocaml first pretends unsound typing is actually sound,
> and then enforces this at run time by throwing an exception
> where one would otherwise accuse the type system of unsoundness,
> but claims the error is not a type error.

What about the possibility to include possible exceptions into a function
signature (a la java)? Does this have problems with type inference? Also,
there is the ocamlexc tool:

http://caml.inria.fr/ocamlexc/ocamlexc.htm

what about it? 

V.

-- 
Please note that I do not read the e-mail address used in the from field but
I read vincenzo_ml at yahoo dot it
Attenzione: non leggo l'indirizzo di posta usato nel campo from, ma leggo
vincenzo_ml at yahoo dot it