From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 5CE1D7ED26 for ; Sun, 27 May 2012 20:19:29 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhkCAEBvwk/RVdy2mWdsb2JhbABEhTavWwgiAQEBAQEICwsHFCeCFwEBAQQBAQEPAg8PAQUIARscAQEDDAYFCw0CAgUWCwICCQMCAQIBEREBBQEcBg0BBwEBFweHWgEDC5lwCQOLW1CCcINtChknDVeIcQEFDIEYiV+ELYESA5UXjhU9hBs X-IronPort-AV: E=Sophos;i="4.75,666,1330902000"; d="scan'208";a="160182255" Received: from mail-vc0-f182.google.com ([209.85.220.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 27 May 2012 20:19:28 +0200 Received: by vcbfy7 with SMTP id fy7so1957846vcb.27 for ; Sun, 27 May 2012 11:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:newsgroups:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=D9RCyHml8Rez+kzPOfuxutYJbMheAUDfgHcSm3LPwmw=; b=cG5pQxSsn9p+QOnB3f19ykUxl215F1JQlhIqKU3kZsN6ims8dcPIysZ4GqPG2fc0V1 vBxCy/stFoSn7Jl/bKs5UZrvFDZMZSJ+vfNL6sCfeAgtsOUnNRNbAjRYzoeJQGTesiyu SkDn7uQaTMi9jlZ/yorN9KLILyAHZCxOAs8tfp5bcfhfnT+LeUwxxDsO+oRKUt8PmrYl 1BUMmr8+LClWZGueNBi617xzdlDXyA5XFFPsLOfxwFvI8kCDQ1r1NUPPSPzs+od55QNb Z7W8xEK3anlIA8PMleZrOBVN5QpSERHOjb91ghHlk0LQCQZew0giVyuy331Yp9jMovi/ iKgA== Received: by 10.52.31.137 with SMTP id a9mr5083807vdi.51.1338142767864; Sun, 27 May 2012 11:19:27 -0700 (PDT) Received: from bok053.wireless-pennnet.upenn.edu (bok053.wireless-pennnet.upenn.edu. [128.91.84.54]) by mx.google.com with ESMTPS id d20sm15078158vde.20.2012.05.27.11.19.27 (version=SSLv3 cipher=OTHER); Sun, 27 May 2012 11:19:27 -0700 (PDT) Message-ID: <4FC2702E.2020004@gmail.com> Date: Sun, 27 May 2012 14:19:26 -0400 From: Hongbo Zhang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 Newsgroups: gmane.comp.lang.caml.inria To: =?UTF-8?B?RGFuaWVsIELDvG56bGk=?= CC: caml-list@inria.fr References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: [Caml-list] Re: Syntax extensions without Camlp4 On 5/27/12 2:04 PM, Daniel Bünzli wrote: > > > Le dimanche, 27 mai 2012 à 18:53, Hongbo Zhang a écrit : > >> Well, I don't think it's good to downplay camlp4. The problem is we need >> more documentation and more tests. > > > camlp4 is one of the (conceptually) ugliest component of the OCaml system. Pre-processors in general are a wrong solution to a real problem; meta-programming facilities should be part of the core language and play by its scoping rules, they should not be layered on top of it. > > The aformentioned proposal is certainly not the best I'm hoping for (the definition and semantics of the attributes is defined by the build system). However it may be a step in the right direction. For one thing by preventing the extension of OCaml's concrete syntax and making attributes part of it, using them doesn't break other tools that act on OCaml sources files; the first one being your syntax highlighter. > > Best, > > Daniel > > > I agree that it would be nice if we have metaocaml in.