Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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,

Bug reports:  FAQ:
To unsubscribe, mail  Archives: