From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105])
by sympa.inria.fr (Postfix) with ESMTPS id E34817ED26
for ; Mon, 28 May 2012 10:18:39 +0200 (CEST)
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApYBACk0w0/RVda2kGdsb2JhbABFhTKvcQgiAQEBAQkJDQcUBCOCFwEBAQMBEgIPHQEbHgMBCwYFBAcZHgICIgERAQUBHAYTGweHWgEDBgULmX4JA4tbUIJwhBsKGScNV4hxAQEEDIp3hC2BEgOVF44VPYQB
X-IronPort-AV: E=Sophos;i="4.75,669,1330902000";
d="scan'208";a="145602818"
Received: from mail-ob0-f182.google.com ([209.85.214.182])
by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-MD5; 28 May 2012 10:18:39 +0200
Received: by obcni5 with SMTP id ni5so9578024obc.27
for ; Mon, 28 May 2012 01:18:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to
:content-type;
bh=kxD9U/Y9Bmr2ELUDnhCwn/WnKhogAjtzMDA4ropIoTY=;
b=it0Dwc5iODZDH2XgnW10PCu+sqbj4bED2JF+dkTEdalt133KLgg/nSfgnMON18j/XG
Ab1RUhzzJzioDLRGWII5Dp9teq0xJ4KRf00Azpj4eOgsL7XMnsMfDZOqbj7lk69+iHPH
viruakg/CdQ5DQycllUWEi8NGvEMZicukQg6LKfc9DyVwRVq+vckPoMkRuA6LXiaxojx
HyqSp7I0YgYFTMri/+3iV9A7IiUjiSPjd/EUxojfM3/DrEoUuq+FfHDZGx22fU4H4eI7
u7VORxqj498Jh54Qs96HOPhpux5LWURWmk/ENBtDHbPjMsNyhn/XCjoCSNHNhFXBAiUQ
t90w==
Received: by 10.182.2.233 with SMTP id 9mr7166918obx.59.1338193117908; Mon, 28
May 2012 01:18:37 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.60.125.233 with HTTP; Mon, 28 May 2012 01:17:57 -0700 (PDT)
In-Reply-To:
References:
From: Paolo Donadeo
Date: Mon, 28 May 2012 10:17:57 +0200
Message-ID:
To: OCaml mailing list
Content-Type: multipart/alternative; boundary=f46d0444ea816f0df504c1145ddd
Subject: Re: [Caml-list] Re: Syntax extensions without Camlp4
--f46d0444ea816f0df504c1145ddd
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Sun, May 27, 2012 at 8:04 PM, Daniel B=C3=BCnzli
wrote:
> 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.
I subscribe. At the present state OCaml, which is otherwise an almost
perfect language, needs some tool, I mean any tool, to accomplish
*simple*metaprogramming tasks.
Camlp4, which could be an awful or an amazing tool, is known by an inner
circle of wizards, and the activity of creating a new syntax extension is
a... sorcery for initiates only.
My experience of average and maybe dumb OCaml programmer: last week I tried
to write a simple ORM, something resembling the Django
ORMand, after
some (random) trial and error, I simply gave up. I have started
thinking to use cpp as a preprocessor to create very simple "templates",
which is awful, but the only alternative I have is to define the ORM
classes in something like XML, parse them and generate OCaml sources.
It's definitively a lose-lose game.
--=20
*Paolo*
--f46d0444ea816f0df504c1145ddd
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Sun, May 27, 2012 at 8:04 PM, Daniel B=C3=BCnzli <daniel.buenzli@erratique.ch> wrote:
<=
blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l=
eft-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;pa=
dding-left:1ex">
camlp4 is one of the (conceptually) ugliest component of the OCaml system.<=
br>Pre-processors in general are a wrong solution to a real problem;
met=
a-programming facilities should be part of the core language and
play by=
its scoping rules, they should not be layered on top of it.
I subscribe. At the present state OCaml, which is otherwise an almost p=
erfect language, needs some tool, I mean any tool, to accomplish simple<=
/i> metaprogramming tasks.
Camlp4, which could be an awful or an ama=
zing tool, is known by an inner circle of wizards, and the activity of crea=
ting a new syntax extension is a... sorcery for initiates only.
My experience of average and maybe dumb OCaml programmer: last week I t=
ried to write a simple ORM, something resembling the Django ORM and, after som=
e (random) trial and error, I simply gave up. I have started thinking to us=
e cpp as a preprocessor to create very simple "templates", which =
is awful, but the only alternative I have is to define the ORM classes in s=
omething like XML, parse them and generate OCaml sources.
It's definitively a lose-lose game.
--
Paolo
--f46d0444ea816f0df504c1145ddd--