caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: qrczak@knm.org.pl (Marcin 'Qrczak' Kowalczyk)
To: caml-list@inria.fr
Subject: Re: [Caml-list] currying...
Date: 7 Mar 2001 08:44:11 GMT	[thread overview]
Message-ID: <slrn9abt6r.4tg.qrczak@qrnik.zagroda> (raw)
In-Reply-To: <4.3.2.7.2.20010306170714.03787b40@shell16.ba.best.com>

Tue, 06 Mar 2001 17:10:56 -0800, Chris Hecker <checker@d6.com> pisze:

> >No, it needs not to create an OCaml closure of any particular arity.
> >It must create a closure which behaves in a particular way: calls the
> >C function after it received the necessary number of arguments. 
> 
> Isn't this the same thing?  How is it different?

It can be a function of two arguments which calls the underlying C
function. Or a function of one argument which returns a function of
one argument which calls the underlying C function. It doesn't matter.

> but I'm not sure whether I'll need to decide whether a given closure
> takes a given number of arguments.

You should not. Because it's a meaningless property. It results
from the way it was compiled, not from its meaning. Writing the same
function in slightly different ways (but equivalent ways as far as
OCaml is involved) can produce differently looking closures.

It's like taking an address of a float. You can do it because a float
is expressed as a heap-allocated objects, but you should not rely
on whether two floats have the same address, because it can depend
on compiler optimizations. It's not a property of OCaml's float type
but an artifact of the implementation.

-- 
 __("<  Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK

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


  reply	other threads:[~2001-03-07  8:48 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
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 [this message]
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=slrn9abt6r.4tg.qrczak@qrnik.zagroda \
    --to=qrczak@knm.org.pl \
    --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).