Version française
Home     About     Download     Resources     Contact us    
Browse thread
my stupidity and non-tail calls
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: A common use of try ... with
> tryeval exp
> val x -> f x (* this case is evaluated only when exp evaluates to a value *)
> with
> (* possible exceptions *)
> | Exception1 -> ...
> | Exception2 y -> ...

No problem: experiment that with Camlp4, which is exactly its application
domain and tell us your conclusions!

> tryeval exp
> val x -> f x (* évalué seulement si exp ne lève pas d'exception, dans
> ce cas x est la valeur de exp *)
> with
> (* exceptions possibles *)
> | Exception1 -> ...
> | Exception2 y -> ...

Pas de problème: expérimente ça avec Camlp4, ce qui est exactement son
domaine d'application et fais-nous part de tes conclusions!

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/