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] Function forward declaration?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-04-07 (14:23)
From: Ville-Pertti Keinonen <will@e...>
Subject: Re: [Caml-list] Function forward declaration?

On Apr 7, 2004, at 4:52 PM, skaller wrote:

> On Wed, 2004-04-07 at 16:01, Nicolas Cannasse wrote:
>> And what would this code do ?
>> let f () = while true do () done
> It blocks a thread. Not even marginally stupid,
> a very common and correct construction at the heart
> of every operating system, it even has a name "wait loop".

Minor nit - you probably mean "idle thread"...and it really isn't 
currently common in the above form, since most modern CPUs are halted 
when idle (although in some cases - SMP, where the wakeup might come 
from another CPU rather than an interrupt - it might be preferable to 
poll something for better wakeup latency).

> *** This isn't a dumb question. Sophisticated algorithms
> can chase down uninitialised values. The question is,

I'd expect (but haven't attempted to prove) detecting uninitialized 
values to be equivalent to the halting problem, so there would 
inevitably be cases that would need to be rejected, detected at 
run-time or result in unsound programs.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: