From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id E3669BBAF for ; Thu, 20 Jul 2006 08:30:01 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k6K6U1UT013422 for ; Thu, 20 Jul 2006 08:30:01 +0200 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 IAA29906 for ; Thu, 20 Jul 2006 08:30:00 +0200 (MET DST) Received: from fiton.bononia.it (fiton.bononia.it [130.186.88.105]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k6K6U0Yh013400 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 20 Jul 2006 08:30:00 +0200 Received: from muletto.takhisis.invalid (fiton.bononia.it [130.186.88.105]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Stefano Zacchiroli", Issuer "sockmel.bononia.it" (not verified)) by fiton.bononia.it (Postfix) with ESMTP id C9815157CB for ; Thu, 20 Jul 2006 08:29:59 +0200 (CEST) Received: by muletto.takhisis.invalid (Postfix, from userid 1000) id 9815444025; Thu, 20 Jul 2006 08:29:11 +0200 (CEST) Date: Thu, 20 Jul 2006 08:29:11 +0200 From: Stefano Zacchiroli To: caml-list@inria.fr Subject: Re: On language extensions (was Re: [Caml-list] global record) Message-ID: <20060720062911.GA14278@aquarium.takhisis.invalid> Mail-Followup-To: caml-list@inria.fr References: <51E3580C-02A1-4344-A5AA-862B580015F1@cs.cornell.edu> <1153372578.18872.13.camel@rosella.wigram> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1153372578.18872.13.camel@rosella.wigram> User-Agent: Mutt/1.5.12-2006-07-14 X-Miltered: at nez-perce with ID 44BF22E9.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 44BF22E8.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; zacchiroli:01 locality:01 syntax:01 ocaml:01 model:01 locality:01 syntax:01 clashes:01 camlp:01 flags:01 makefile:01 cheers:01 zacchiroli:01 unibo:01 20,:98 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 On Thu, Jul 20, 2006 at 03:16:18PM +1000, skaller wrote: > On Wed, 2006-07-19 at 21:12 -0400, Eric Breck wrote: > > Such locality is a basic principle of software engineering, > > and in this case I don't really know how to achieve it with only a > > library (and not a syntax extension). > > In my opinion, the difficulty here lies in the Ocaml > programming model. > > Precisely as you say above regarding locality .. the syntax > extensions should be localised. In particular, they should > be embedded in the file that uses them -- along with > documentation -- and not specified on the command line. > > For example > > syntax MyExtensions;; Fully agreed. Me myself try to enforce locality of syntax extensions to avoid possible clashes. Unfortunately handling that in large project is really painful, since you end up in having to differentiate "clusters" of files which need to be built with different set of camlp4 flags, and you need to do that in Makefile. In my mind this is asking for trouble, and the usual solution I pursue is to avoid using syntax extensions ... a pity. Cheers. -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/ If there's any real truth it's that the entire multidimensional infinity of the Universe is almost certainly being run by a bunch of maniacs. -!-