From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 765EBBC0A for ; Wed, 23 May 2007 23:51:58 +0200 (CEST) Received: from ptb-relay03.plus.net (ptb-relay03.plus.net [212.159.14.214]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4NLpvvR016705 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 23 May 2007 23:51:58 +0200 Received: from [80.229.56.224] (helo=beast.local) by ptb-relay03.plus.net with esmtp (Exim) id 1HqykL-0007Ms-Td for caml-list@inria.fr; Wed, 23 May 2007 22:51:54 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@inria.fr Subject: Re: [Caml-list] Teaching bottomline, part 3: what should improve. Date: Wed, 23 May 2007 22:46:13 +0100 User-Agent: KMail/1.9.7 References: <1179871823.6966.78.camel@Blefuscu> <20070523185428.GA32681@furbychan.cocan.org> <4654959C.7040701@fischerventure.com> In-Reply-To: <4654959C.7040701@fischerventure.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705232246.14189.jon@ffconsultancy.com> X-Miltered: at concorde with ID 4654B77D.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; threads:01 iter:01 solver:01 fsharp:01 fsharp:01 ocaml:01 elegantly:01 pumps:98 frog:98 incremental:01 wrote:01 caml-list:01 concurrency:02 concurrency:02 constructs:02 On Wednesday 23 May 2007 20:27:24 Robert C Fischer wrote: > ...and locks and threads are not a viable long-term solution to the > problem of concurrency in general. Absolutely, that's why we have parallel iter, map, fold etc. > You're future-proofing enough by teaching them functional languages Functional programming is not a panacea. GUI programming is one application area where functional programming, immutability and the parallelizable constructs that I just mentioned are not so beneficial. To solve GUI programming you need different constructs (events, message pumps etc.). Look at some of the example F# programs on our site. This Sudoku solver uses a worker thread to keep the GUI responsive while it solves puzzles: http://www.ffconsultancy.com/dotnet/fsharp/sudoku/index.html This ray tracer uses concurrency for incremental update of a responsive GUI: http://www.ffconsultancy.com/dotnet/fsharp/raytracer/index.html This particle simulator runs the simulation thread in parallel with the GUI thread, for real-time visualization of the particle system: http://www.ffconsultancy.com/products/fsharp_for_visualization/demo3.html In the future, I hope OCaml will support concurrency not only to handle parallel constructs but also to handle GUI programming elegantly. If there is one thing that I have been singularly impressed by from .NET, it is GUI programming. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. The F#.NET Journal http://www.ffconsultancy.com/products/fsharp_journal/?e