English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Function call with a list of parameters
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-12-12 (19:05)
From: Patrick M Doane <patrick@w...>
Subject: Re: [Caml-list] Function call with a list of parameters
On Wed, 12 Dec 2001, Chris Hecker wrote:

> It does seem like there's an asymmetry in parameters versus return
> values that might be worth looking into (in languages in general, not
> just caml).  Bruce's example was interesting to me because I didn't
> know that lisp had tuples (as opposed to just lists).  That
> reintroduces the asymmetry that I'm talking about, where if everything
> was just a list (both returns and params) then it would be symmetric
> and apply would just work.  Even with tuples, lisp is still more
> symmetric since you can convert a tuple to a list generically and then
> pass it in with apply (according to Bruce's example).

I understand your point and mostly agree with it, but keep in mind that:

  let f x y = (x,y)

is not a function that takes 2 parameters. So, I would say that Caml is
symmetric if you don't curry the arguments.

Also, the style of currying everything is a little different in the SML
community. Their compilers often expect (and optimize for) multiple
parameters as tuples.


Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr