Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] "Or" patterns when both matchings
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Luc Maranget <luc.maranget@i...>
Subject: Re: [Caml-list] "Or" patterns when both matchings
> 
> Hmm, I must side with Pixel here. Ease of compilation is rarely a good
> design principle for a programming language. The use of or patterns
> allows one to factor right hand sides as in the example shown below:
> 
> 	| Foo(a)
>              | a -> <complicated expression involving a>
> 
> If Or-patterns do not follow the first-to-last matching order, then
> producing correct code and reading it becomes more difficult. I wasn't
> aware of the Or-compilation strategy and I'm sure I made this mistake in
> the past as well.
> 
> -Maf
> 
> 

You are right, I missed that point. I'll think about correcting that,
but it is not a trivial change.

Thanks for your feedback,

--Luc
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr