Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Pattern matching over elements at the front of a container
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: William Lovas <wlovas@s...>
Subject: Re: [Caml-list] Pattern matching over elements at the front of a container
On Sun, Jun 27, 2004 at 11:11:24AM +0100, Richard Jones wrote:
> 
> Also, being able to pattern match on substrings would be useful, if a
> notation could be introduced for it.  Something like:
> 
> match str with
>   "prefix" ^ str -> ...

It seems like all of these requests are really just asking for a generic
method for defining different ways of pattern matching data types.  After
hearing about why `eqtype' isn't right for O'Caml, i'd doubt any of these
ad-hoc pattern matching transformations would be either -- support for a
mechanism like views [1] would be better.  Which probably means "not
anytime soon" :)

cheers,
William

[1] http://www.haskell.org/development/views.html

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners