From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA32006; Wed, 7 Mar 2001 09:48:24 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA31766 for ; Wed, 7 Mar 2001 09:48:23 +0100 (MET) Received: from mail.mimuw.edu.pl (po30.warszawa.cvx.ppp.tpnet.pl [213.76.110.30]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f278mH108630 for ; Wed, 7 Mar 2001 09:48:17 +0100 (MET) Received: (from news@localhost) by mail.mimuw.edu.pl (PLD/8.9.3) id JAA05078 for caml-list@inria.fr; Wed, 7 Mar 2001 09:44:14 +0100 X-Authentication-Warning: qrnik.zagroda: news set sender to qrczak@knm.org.pl (Marcin 'Qrczak' Kowalczyk) using -f From: qrczak@knm.org.pl (Marcin 'Qrczak' Kowalczyk) Subject: Re: [Caml-list] currying... Date: 7 Mar 2001 08:44:11 GMT Organization: Klub Nieszkodliwych =?iso-8859-2?Q?Manjak=F3w?= Message-ID: References: <4.3.2.7.2.20010306012957.00c7cf00@shell16.ba.best.com> <4.3.2.7.2.20010306012957.00c7cf00@shell16.ba.best.com> <4.3.2.7.2.20010306093019.00e181f0@shell16.ba.best.com> <4.3.2.7.2.20010306120843.037813b0@shell16.ba.best.com> <4.3.2.7.2.20010306150210.037887a0@shell16.ba.best.com> <4.3.2.7.2.20010306170714.03787b40@shell16.ba.best.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 8bit X-Trace: qrnik.zagroda 983954651 5041 192.168.0.1 (7 Mar 2001 08:44:11 GMT) X-Complaints-To: news@qrnik.zagroda NNTP-Posting-Date: 7 Mar 2001 08:44:11 GMT User-Agent: slrn/0.9.6.3 (Linux) To: caml-list@inria.fr Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Tue, 06 Mar 2001 17:10:56 -0800, Chris Hecker 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