caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Yaron Minsky" <yminsky@cs.cornell.edu>
To: "Joel Reymont" <joelr1@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] camlp4 and class introspection
Date: Sun, 10 Jun 2007 18:07:12 -0400	[thread overview]
Message-ID: <891bd3390706101507h68b5436s458e213a813d7ce0@mail.gmail.com> (raw)
In-Reply-To: <9E55FC99-E968-45E2-9F64-A2B6BE6ED415@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]

Others can probably give a better definition of type-directed programming
than I can, and it's possible I'm misusing the time.  But in any case, what
I mean by type-directed programming is roughly this:  for each type, you
define a value corresponding to that type that contains useful information
about the type.  In our s-expression macros, these values are simply
functions named sexp_of_<type> and <type>_of_sexp for each type.  The role
of these values is to essentially give you a run-time representation of the
type, in a rather static way.

Macros come in by giving you a way to automate the generation of these
type-related values, which otherwise can be rather tedious.

y

On 6/10/07, Joel Reymont <joelr1@gmail.com> wrote:
>
> Yaron,
>
> On Jun 10, 2007, at 9:02 PM, Yaron Minsky wrote:
> > I actually think you can do this kind of thing with a combination of
> > type-directed programming and macros.
>
> What would be type-directed programming in this scenario?
>
> Would this be done within camlp4?
>
>         Thanks, Joel
>
> --
> http://topdog.cc      - EasyLanguage to C# translator
> http://wagerlabs.com  - Blog
>
>
>

[-- Attachment #2: Type: text/html, Size: 1640 bytes --]

  reply	other threads:[~2007-06-10 22:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-09 22:59 Joel Reymont
2007-06-10  0:14 ` [Caml-list] " Jonathan Bryant
2007-06-10 12:30   ` Joel Reymont
2007-06-10 20:02     ` Yaron Minsky
2007-06-10 21:18       ` Joel Reymont
2007-06-10 22:07         ` Yaron Minsky [this message]
2007-06-11  0:58     ` Jacques GARRIGUE
2007-06-11  8:05       ` Joel Reymont
2007-06-11 10:11         ` Martin Jambon
2007-06-11 10:16           ` Joel Reymont
2007-06-11 11:36             ` Martin Jambon

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=891bd3390706101507h68b5436s458e213a813d7ce0@mail.gmail.com \
    --to=yminsky@cs.cornell.edu \
    --cc=caml-list@yquem.inria.fr \
    --cc=joelr1@gmail.com \
    /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).