Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 Archives:
Bug reports: FAQ:
Beginner's list: