caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jeffrey Scofield <jeffsco@pse.psellos.com>
To: caml-list@inria.fr
Subject: [Caml-list] Re: Syntax extensions without Camlp4
Date: 28 May 2012 10:52:06 -0500	[thread overview]
Message-ID: <m31um4qp5l.fsf@pse.psellos.com> (raw)
In-Reply-To: <9B6D7FCED63545E2BB3F0DDD7B337AA1@erratique.ch>

Daniel Bünzli <daniel.buenzli@erratique.ch> writes:

> > The problem is that it's purely for partial evaluation and not
> >  extending the syntax.
> 
> Then it's perfect ! I think it's wrong to try to extend the language
> per se. Most of the time, except for very particular things
> (e.g. introducing a monad notation), the dsl approach is perfectly
> sufficient. Don't think you absolutely need to extend the OCaml
> grammar, embed your dsl directly into OCaml, using OCaml language
> binders if you need variables.
> 
> Make libraries, not pet syntactic constructs.

For what it's worth, I heartily endorse this approach.  Use of campl4
when something simpler will do is a real burden on people learning
the language and people combining modules.  OCaml has already
fragmented into two different syntaxes, and I've already chosen to
hack several different modules for my own use by stripping out all the
syntax extensions.  In the long run this doesn't scale very well
(in my opinion).

The baseline for OCaml is already a large (rich, complex, amazing)
language.  But it's hard to pitch it to potential adopters if it's
also a rapidly moving and ramifying target.

(I should say that the syntactic flexibility is fantastic for language
researchers, it's users who are solving practical problems with the
language that I'm talking about.  I would put myself in this
category.)

Just my opinion.

Jeffrey Scofield
Seattle


  parent reply	other threads:[~2012-05-28 15:55 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-27 15:06 [Caml-list] " Alexandre Pilkiewicz
2012-05-27 16:53 ` [Caml-list] " Hongbo Zhang
2012-05-27 18:04   ` Daniel Bünzli
2012-05-27 18:18     ` Hongbo Zhang
2012-05-27 19:01       ` Daniel Bünzli
2012-05-27 22:43         ` Wojciech Meyer
2012-05-28  9:35           ` Daniel Bünzli
2012-05-28  9:59             ` Gabriel Scherer
2012-05-30 14:45               ` Hongbo Zhang
2012-05-28 11:17             ` Wojciech Meyer
2012-05-28 15:52             ` Jeffrey Scofield [this message]
2012-05-27 18:19     ` Hongbo Zhang
2012-05-28  8:17     ` Paolo Donadeo
2012-05-30 12:41   ` Alain Frisch
2012-05-30 13:18     ` Markus Mottl
2012-05-30 13:37     ` Dan Bensen
2012-05-30 14:16       ` Hongbo Zhang
2012-05-30 14:23         ` Paolo Donadeo
     [not found]           ` <20120531081913.GA26742@securactive.lan>
2012-05-31 12:26             ` Paolo Donadeo
2012-05-31 12:38               ` Anil Madhavapeddy
2012-05-31 12:40                 ` Anil Madhavapeddy
2012-05-31 12:46                   ` Yaron Minsky
2012-05-31 12:47                   ` Gabriel Scherer
2012-05-31 22:08                 ` Paolo Donadeo
2012-05-30 14:14     ` Hongbo Zhang
2012-05-31 12:59       ` Alain Frisch
2012-05-31 13:21         ` Dmitry Grebeniuk
2012-05-31 14:30           ` Daniel Bünzli
2012-05-31 16:01         ` bob zhang
2012-05-31 17:28           ` Gerd Stolpmann
2012-05-31 18:03             ` Wojciech Meyer
2012-05-31 18:32               ` Gerd Stolpmann
2012-05-31 18:32             ` Hongbo Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m31um4qp5l.fsf@pse.psellos.com \
    --to=jeffsco@pse.psellos.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).