caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Markus Mottl <markus.mottl@gmail.com>
To: OCaml List <caml-list@yquem.inria.fr>
Subject: [Caml-list] ppx replacement for pa_macro?
Date: Mon, 2 Nov 2015 16:11:56 -0500	[thread overview]
Message-ID: <CAP_800pa9Cq8--YJTGYHbsHQOo1Q6d+DJcRBoLwHg1bsQPmFyQ@mail.gmail.com> (raw)

Hi,

it seems that a good chunk of camlp4-based preprocessors has been
translated to ppx.  However, I haven't seen a good (or hopefully even
better) replacement for pa_macro yet.

OCaml is still a bit lacking in the inlining department, e.g. for
partially applied functions where the supplied parameters are known at
compile time.  Until this changes, macro substitutions are my only
option in certain cases if I want to avoid cut&paste or larger
closures, expensive function calls, etc.

I like the pa_macro feature for locally defined macros, but it's a
pity that it doesn't support "higher-order" macros (that can be passed
around), and it's also the last thing that prevents me from fully
switching to ppx.

Any alternatives?  Is anybody working on a more powerful, ppx-based replacement?

Regards,
Markus

-- 
Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com

                 reply	other threads:[~2015-11-02 21:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAP_800pa9Cq8--YJTGYHbsHQOo1Q6d+DJcRBoLwHg1bsQPmFyQ@mail.gmail.com \
    --to=markus.mottl@gmail.com \
    --cc=caml-list@yquem.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).