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 JAA24048; Thu, 24 Oct 2002 09:39:08 +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 JAA26577 for ; Thu, 24 Oct 2002 09:39:07 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from smtp3.cp.tin.it (vsmtp3.tin.it [212.216.176.223]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g9O7d2D03252 for ; Thu, 24 Oct 2002 09:39:07 +0200 (MET DST) Received: from dalamar.takhisis.org (80.117.62.44) by smtp3.cp.tin.it (6.5.029) id 3DB5E7590006ED1D for caml-list@inria.fr; Thu, 24 Oct 2002 09:39:00 +0200 Received: from lordsoth.takhisis.org (lordsoth.takhisis.org [192.168.1.119]) by dalamar.takhisis.org (8.12.6/8.12.6/Debian-7) with ESMTP id g9O7cs3i001090 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=FAIL) for ; Thu, 24 Oct 2002 09:38:55 +0200 Received: from lordsoth.takhisis.org (lordsoth.takhisis.org [192.168.1.119]) by lordsoth.takhisis.org (8.12.6/8.12.6/Debian-7) with ESMTP id g9O7ch3c010063 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 24 Oct 2002 09:38:43 +0200 Received: (from zack@localhost) by lordsoth.takhisis.org (8.12.6/8.12.6/Debian-7) id g9O7chBo010061 for caml-list@inria.fr; Thu, 24 Oct 2002 09:38:43 +0200 Date: Thu, 24 Oct 2002 09:38:43 +0200 From: Stefano Zacchiroli To: Ocaml Subject: Re: [Caml-list] Again on pattern matching and strings Message-ID: <20021024073843.GA9517@cs.unibo.it> Mail-Followup-To: Ocaml References: <3DB73515.90705@baretta.com> <20021023235719.GA9170@cs.unibo.it> <3DB79CD7.6040600@baretta.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3DB79CD7.6040600@baretta.com> User-Agent: Mutt/1.4i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Oct 24, 2002 at 09:10:15AM +0200, Alessandro Baretta wrote: > Eh, no! This is really unacceptable as a general solution. > Of course, I could have coded my function this way, but this > technique is not scalable, especially from the perspective > of computational efficiency. Your code is compiled as a Yes, but your mail, expecially the part I quoted, complained about elegancy of the code, not about efficiency. > >Anyway from a more general point of view I'm also interested in seeing > >"aliasing" or constant definition in the compiler, it is of general > >interest, not only in pattern matching. > > To my great surprise, I'm unable to think of an example > relating to anything other than pattern matching. For example: the classic magic numbers problem used in almost all programs, for example a global variable "debug" which can be safely a constant (or an alias as you called it) instead of a global "let val". Cheers. -- Stefano Zacchiroli - undergraduate student of CS @ Univ. Bologna, Italy zack@cs.unibo.it | ICQ# 33538863 | http://www.cs.unibo.it/~zacchiro "I know you believe you understood what you think I said, but I am not sure you realize that what you heard is not what I meant!" -- G.Romney ------------------- 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