From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA15756; Thu, 13 Sep 2001 16:13:20 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 QAA15767 for ; Thu, 13 Sep 2001 16:13:19 +0200 (MET DST) Received: from shell5.ba.best.com (shell5.ba.best.com [206.184.139.136]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f8DEDIP01079; Thu, 13 Sep 2001 16:13:18 +0200 (MET DST) Received: from localhost (bpr@localhost) by shell5.ba.best.com (8.9.3/8.9.2/best.sh) with ESMTP id HAA06851; Thu, 13 Sep 2001 07:13:17 -0700 (PDT) Date: Thu, 13 Sep 2001 07:13:16 -0700 (PDT) From: Brian Rogoff To: Daniel de Rauglaudre cc: SooHyoung Oh , caml-list Subject: Re: [Caml-list] function vs. parser In-Reply-To: <20010913104853.M24601@verdot.inria.fr> Message-ID: <20010913070823.C3927-100000@shell5.ba.best.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 13 Sep 2001, Daniel de Rauglaudre wrote: > On Thu, Sep 13, 2001 at 05:20:11PM +0900, SooHyoung Oh wrote: > > > Could anyone explain me why "parser" was introduced in Ocaml? > > As you know, "function" is using in the caml light-instead of "parser". > > "parser" must be a reserved word like "let" and "function", right? > > Right: "parser" is used because they are not functions. In Caml Light, > we used "function", but it was an bad idea: the pattern matching rules > in parsers have nothing to do with the pattern matching rules in > functions and it was important to separate the notions. I have a petty complaint. Another name would have been better, say "parse" to match "match" since "parser" is a good name for a type and at least in English there are no good synonyms. If you start writing combinator parsers you have to hack the keyword parser to be parser_t or _parser or somesuch, which is a little ugly. Hey, I said it is a *petty* complaint! ;-) -- Brian ------------------- 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