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 QAA11708; Wed, 7 Apr 2004 16:23:20 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA11878 for ; Wed, 7 Apr 2004 16:23:18 +0200 (MET DST) Received: from oxy.exomi.com (fa-3-0-0.fw.exomi.com [217.169.64.99]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i37ENHYM000662 for ; Wed, 7 Apr 2004 16:23:18 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by oxy.exomi.com (Postfix) with ESMTP id 826211A692D; Wed, 7 Apr 2004 17:24:09 +0300 (EEST) In-Reply-To: <1081345936.19232.579.camel@pelican> References: <60532B15DF92FD4693AA89B2F7E01D8F013F29EC@tmex02> <00cf01c41bd6$391b53a0$0203a8c0@hoedic> <20040406175320.GA19840@redhat.com> <1081279717.16531.6.camel@qrnik> <002901c41c65$b53e4c50$19b0e152@warp> <1081345936.19232.579.camel@pelican> Mime-Version: 1.0 (Apple Message framework v613) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <3B300570-889F-11D8-A3FA-000393863F70@exomi.com> Content-Transfer-Encoding: 7bit Cc: Nicolas Cannasse , "Marcin 'Qrczak' Kowalczyk" , caml-list From: Ville-Pertti Keinonen Subject: Re: [Caml-list] Function forward declaration? Date: Wed, 7 Apr 2004 17:24:08 +0300 To: skaller@users.sourceforge.net X-Mailer: Apple Mail (2.613) X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 cannasse:01 marginally:01 stupid:01 preferable:01 latency:01 run-time:01 unsound:01 nicolas:01 detecting:02 thread:02 thread:02 wrote:03 wrote:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 91 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 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