From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA02022 for caml-redistribution; Fri, 14 May 1999 18:23:53 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA20691 for ; Fri, 14 May 1999 18:14:40 +0200 (MET DST) Received: from mail2.microsoft.com (mail2.microsoft.com [131.107.3.124]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id SAA11151 for ; Fri, 14 May 1999 18:14:37 +0200 (MET DST) Received: by mail2.microsoft.com with Internet Mail Service (5.5.2524.0) id ; Fri, 14 May 1999 09:14:35 -0700 Message-ID: <783D93998201D311B0CF00805FEAA07B7E8DAE@RED-MSG-42> From: Manuel Fahndrich To: "'caml-list@inria.fr'" Subject: RE: stream pattern [< pat=exp >] and extensions to ordinary patte rn m atching Date: Fri, 14 May 1999 09:14:34 -0700 X-Mailer: Internet Mail Service (5.5.2524.0) Sender: weis I have to reply to my own earlier (faulty) comments... [...] I believe that with such an extension to OCAML, the pattern language we explored in the ICFP paper could be expressed completely (and more). [...] This is not entirely true. The pattern language explored in the ICFP paper allows one to write non-deterministic patterns that get influenced by the context. For example: pat leftOrRight(x) = (x, _) | (_, x) If I then write match (1,2) with leftOrRight(2) -> | leftOrRight(y) -> the first clause would apply. Using the pat=exp approach from stream parsers, such choices in function of pat would not be possible. I consider this feature not essential, and having pat=exp patterns whose semantics evaluate exp first without regard to pat would still be very useful. -Manuel Fahndrich