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 UAA04100; Tue, 11 Sep 2001 20:12:42 +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 UAA04159 for ; Tue, 11 Sep 2001 20:12:41 +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 f8BICe116973 for ; Tue, 11 Sep 2001 20:12:40 +0200 (MET DST) Received: from localhost (bpr@localhost) by shell5.ba.best.com (8.9.3/8.9.2/best.sh) with ESMTP id LAA12305; Tue, 11 Sep 2001 11:11:21 -0700 (PDT) Date: Tue, 11 Sep 2001 11:11:21 -0700 (PDT) From: Brian Rogoff To: Andreas Rossberg cc: Subject: Re: [Caml-list] Style question In-Reply-To: <3B9DE076.568458F9@ps.uni-sb.de> Message-ID: <20010911094011.D12328-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 Tue, 11 Sep 2001, Andreas Rossberg wrote: > Brian Rogoff wrote: > > > > It seems to me that all of the uses of local in SML can be handled can be > > handled by the module system in OCaml, and I don't even find the unsugared > > forms to be bad at all. > > It is not exactly sugar since you can express things with local that you > cannot with signatures - but all of them are pretty useless. I've only seen some of the more bizarre uses (like coding dynamics using "polymorphic" local exceptions) as stupid pet tricks. But I've read lot's of SML code that makes heavy use of local to hide function names. I almost never see an abstype. > My personal opinion is that using modules is preferable even in SML, > its local being an anachronism from the pre-module days, just like > abstype. I almost never use it. Good! Your code should port easily then. > It only comes in handy in conjunction with open: Right, but I assume you know the workaround, since you decribe it in a followup, and I assume you've read this page http://www.ps.uni-sb.de/~rossberg/SMLvsOcaml.html I just wish the author would update the section on localdecs to mention using modules instead of local open :-) -- Brian http://www.ps.uni-sb.de/~rossberg/SMLvsOcaml.html#localdecs > > local open M in > ... > end > > Of course, in OCaml this is solved by having open vs. include. > > - Andreas > > -- > Andreas Rossberg, rossberg@ps.uni-sb.de > > "Computer games don't affect kids; I mean if Pac Man affected us > as kids, we would all be running around in darkened rooms, munching > magic pills, and listening to repetitive electronic music." > - Kristian Wilson, Nintendo Inc. > ------------------- > 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 > ------------------- 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