Version française
Home     About     Download     Resources     Contact us    
Browse thread
Request for complete pattern matching
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe Raffalli <christophe.raffalli@u...>
Subject: Re: [Caml-list] Request for complete pattern matching

> 
> I do not get the idea either, can you be a bit more specific ?
> I have more or less the feeling that
> 
> match f with
>  pattern <= expr expr expr -> bonga
> 
> means
> 
> match f expr expr expr with
> p -> bonga 
> 

This is true ....

but how do you translate

match e with
  S(P(g) <= 0) -> g
| ....

answer :

match f with
   S(f) ->
	match f 0 with
	  P(g) -> ...
| ...

and as you see the "..." are duplicated !!!

you can get an exponential explosion in the size of the program.

The you have to give names to value in the "..." and you get very ugly 
programs ...


> Thus I hardly seen your point.
> 
> --Luc Maranget

-- 
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
---------------------------------------------
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature. The public key is
stored on www.keyserver.net
---------------------------------------------