caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Chris Hecker <checker@d6.com>
To: qrczak@knm.org.pl (Marcin 'Qrczak' Kowalczyk), caml-list@inria.fr
Subject: Re: [Caml-list] currying...
Date: Tue, 06 Mar 2001 12:14:35 -0800	[thread overview]
Message-ID: <4.3.2.7.2.20010306120843.037813b0@shell16.ba.best.com> (raw)
In-Reply-To: <slrn9aadf8.up2.qrczak@qrnik.zagroda>


>> Now my question is, is there any way to introspect to get at the
>> arity information?
>You shouldn't need it. It's an implementation detail and doesn't have
>to have any meaning. It should never be used to drive the semantics -
>code should behave in the same way no matter how a function is built
>internally.

But that's not true if I'm trying to proxy a caml function with a c function.  I need to know where the "return value" starts.  So yes, on the caml side it's an implementation detail, but on the C side it's important (since it's hooking into the implementation).

>AFAIK this internal "uncurrying" is limited to a constant (up to 5
>arguments or something). Above that functions are really implemented
>as functions returning functions, in groups of 5 arguments.

That can't be true at the lowest level, unless caml does some really stoked partial evaluation analysis.  If I write a function that takes 10 parms and uses them in a nonlinear way then I don't think you can factor it into 2 5-parm functions.  Unless you're saying it just substitutes them into the function, but then it would have to build a whole new function every time your partially applied.

Chris

-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


  reply	other threads:[~2001-03-06 20:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-06  9:39 Chris Hecker
2001-03-06 10:22 ` Thomas Colcombet
2001-03-06 10:33 ` Bruce Hoult
2001-03-06 10:50 ` Remi VANICAT
2001-03-06 16:31 ` Xavier Leroy
2001-03-06 17:41   ` Chris Hecker
2001-03-06 18:43     ` Sven LUTHER
2001-03-06 19:09     ` Marcin 'Qrczak' Kowalczyk
2001-03-06 20:14       ` Chris Hecker [this message]
2001-03-06 21:39         ` Marcin 'Qrczak' Kowalczyk
2001-03-06 23:23           ` Chris Hecker
2001-03-06 23:45             ` Marcin 'Qrczak' Kowalczyk
2001-03-07  1:10               ` Chris Hecker
2001-03-07  8:44                 ` Marcin 'Qrczak' Kowalczyk
2001-03-06 23:51             ` Chris Hecker
2001-03-06 10:16 Adam Granicz

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=4.3.2.7.2.20010306120843.037813b0@shell16.ba.best.com \
    --to=checker@d6.com \
    --cc=caml-list@inria.fr \
    --cc=qrczak@knm.org.pl \
    /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).