From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 4738ABC69 for ; Wed, 25 Apr 2007 03:03:54 +0200 (CEST) Received: from ipmail01.adl2.internode.on.net (ipmail01.adl2.internode.on.net [203.16.214.140]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l3P13pL2029782 for ; Wed, 25 Apr 2007 03:03:53 +0200 X-IronPort-AV: E=Sophos;i="4.14,448,1170595800"; d="scan'208";a="119124107" Received: from ppp8-148.lns1.syd7.internode.on.net (HELO [192.168.1.201]) ([59.167.8.148]) by ipmail01.adl2.internode.on.net with ESMTP; 25 Apr 2007 10:33:50 +0930 Subject: Re: new+old Camlp4 (was Re: [Caml-list] Bug in ocamlyacc) From: skaller To: Martin Jambon Cc: Diego Olivier FERNANDEZ PONS , caml-list@inria.fr In-Reply-To: References: <001401c785f3$3af5e890$6a7ba8c0@treble> <1177392571.10100.46.camel@rosella.wigram> <20070424122338.ozkvhzfhckcskkc4@webmail.etu.upmc.fr> <1177439118.6172.18.camel@rosella.wigram> Content-Type: text/plain Date: Wed, 25 Apr 2007 11:03:45 +1000 Message-Id: <1177463025.6862.26.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 462EA8F7.003 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 bug:01 ocamlyacc:01 camlp:01 ocaml:01 unmanageable:01 ocaml:01 preferrable:01 syntax:01 syntax:01 makefiles:01 bug:01 multi-stage:01 2007,:98 sourceforge:01 On Tue, 2007-04-24 at 13:17 -0700, Martin Jambon wrote: > On Wed, 25 Apr 2007, skaller wrote: > I wanted to start this as dedicated thread, but let's do it now. > The current situation with camlp4 3.10-beta is terrible. Not > because the new camlp4 is not good or anything, but because it is not > compatible with the old one and yet replaces it. Replacing the old one by > the new one in the next release of OCaml is practically unmanageable > because: > > 1) Source duplication is unavoidable > 2) Upgrading to the new camlp4 is not automatic Curious, but can't you run camlp4 (old) to generate pure Ocaml text? Then, you have no macros and can re-introduce them. > A smooth transition would be much preferrable. I acknowledge that I don't > know how make it possible to use syntax extensions using the old and the > new camlp4 on a same ocaml source file, but for those using only one > extension or several extensions using the same version of camlp4, it would > be convenient if it just works. An alternative is a translator from old to new syntax, I guess that would be HARD otherwise it would have been done? > * It means two versions of camlp4 would be distributed and installed with > ocaml 3.10. > * Command names for the new camlp4 would be distinct from the old camlp4. > * Old programs would still compile and work without having to patch > makefiles. > * Upgraded programs could add new features only to the 3.10 version, while > maintaining minimal support (bug fixes) for the 3.09 version, without > forcing the camlp4 programmer to use ocaml 3.09 for testing. > * New programs could support only the new camlp4. > > Does that make sense? I wonder if a pipeline would work, so you can multi-stage pre-processors? -- John Skaller Felix, successor to C++: http://felix.sf.net