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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id D019BBC57 for ; Thu, 23 Sep 2010 20:54:29 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjkBACY/m0zRVdi2kGdsb2JhbACiLAgVAQEBAQkJDAcRAx+sRotRhmuJAwEBAwWFPQSEToVqhWCDIw X-IronPort-AV: E=Sophos;i="4.57,224,1283724000"; d="scan'208";a="59027304" Received: from mail-qy0-f182.google.com ([209.85.216.182]) by mail3-smtp-sop.national.inria.fr with ESMTP; 23 Sep 2010 20:54:29 +0200 Received: by qyk31 with SMTP id 31so440502qyk.6 for ; Thu, 23 Sep 2010 11:54:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=4uPaXODwKFBoNm1RABdSwuT5tJjmJnqSnaSL1PoeSlU=; b=braiNWgqPwlF9Cd9N4DQ3oojPj28hjIpgidhApSoq0AtF+SeVqaeH/N9Y4FKDLg48S DFo3DIiptu3IRfKAr9l/PbVbrU2pDioi6oEw73vYufJ8zmoBEHVGb6qJCmKFVjzJ0sAW Fkos9KhZjMawXLA2H2drUTngve9czmr3bvd+k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=tUrSW9tk3HeOHwaZ5DDzOgxDPKSHt1lTgKSxN1WWg6qI9I+Eif1bHxZT5ynDxMTV0l VPNLGnzVztRHxlu9YKAqSnMzAETx4ZCLz/mobTDDGBqS0WPCPcv/yCPDyRtPYK3IO1KS x61RE20cqCaUP5qBCUSytZgWPJxGVn0Avo3JU= Received: by 10.224.96.146 with SMTP id h18mr1621903qan.85.1285268068507; Thu, 23 Sep 2010 11:54:28 -0700 (PDT) MIME-Version: 1.0 Sender: jake.donham@gmail.com Received: by 10.229.8.11 with HTTP; Thu, 23 Sep 2010 11:54:08 -0700 (PDT) In-Reply-To: References: From: Jake Donham Date: Thu, 23 Sep 2010 11:54:08 -0700 X-Google-Sender-Auth: EqWO_OGgfqvcmDzTsuo8s9cALZg Message-ID: Subject: Re: [Caml-list] what do I need to know to understand camlp4 To: ben kuin Cc: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; camlp:01 camlp:01 abstraction:01 23,:98 leaky:98 wrote:01 syntactic:01 readable:01 caml-list:01 ast:02 ast:02 quotations:03 quotations:03 notion:04 thu:05 On Thu, Sep 23, 2010 at 11:49 AM, ben kuin wrote: > thanks Jake, after browsing through those articles I came to the > conclusion that for understanding and using camlp4 the notion of > quotations and antiquotations is fundamental. My absolute lack of > knowledge in this area might be a reason why I can't figure out how > camlp4 works. Unfortunately quotations are a rather leaky abstraction. You need to understand what is happening at the AST level to do anything complicated, and to understand what's wrong when you get an error. Anything you can do with quotations you can of course do directly with the AST, since quotations are just syntactic sugar for the AST. But to make the code readable quotations are essential. Jake