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] ocaml killer
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-01-30 (00:06)
From: Martin Berger <martinb@d...>
Subject: Re: [Caml-list] ocaml and concurrency
> Perhaps because you're a type theorist? <g>

being a type theorist has many disadvantages ...

> C not only *does* have function types, it has
> first class function values just like ML does.

well, i'm not so sure about this for two reasons.

firstly, NULL-pointers (i'm assuming that in C/C++ function
pointers can be NULL, though it's been too long for me to remember
precisely). that means, you have values of function pointer type
that act ... well ... in interesting ways. from that point of
view, function pointers T (*)(A) correspond more to a sum type

    (A --> T) + Error

secondly, there's the "location restriction". maybe it's an
issue of taste, but one might argue that for function really
being first class -- as in lambda calculi, whenever we have
a piece of code C with free variable x_1 of type T_1, ...,
x_n of type T_n, then we can abstract and form
(lambda x_1 ... x_n . C), as we can in ML, but not
in C/Java/C++.


To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners