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 HAA28534; Fri, 2 Apr 2004 07:09:16 +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 HAA28369 for ; Fri, 2 Apr 2004 07:09:15 +0200 (MET DST) From: briand@aracnet.com Received: from obsidian.spiritone.com (obsidian.spiritone.com [216.99.193.137]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i3259DYM005675 for ; Fri, 2 Apr 2004 07:09:14 +0200 Received: from soggy.deldotd.com (216-99-206-32.cust.aracnet.com [216.99.206.32]) by obsidian.spiritone.com (8.12.10/8.12.8) with ESMTP id i3259BHQ004966; Thu, 1 Apr 2004 21:09:11 -0800 Received: from briand by soggy.deldotd.com with local (Exim 3.36 #1 (Debian)) id 1B9GvP-0002Cf-00; Thu, 01 Apr 2004 21:09:03 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16492.62831.800184.681344@soggy.deldotd.com> Date: Thu, 1 Apr 2004 21:09:03 -0800 To: Ville-Pertti Keinonen Cc: skaller@users.sourceforge.net, caml-list@pauillac.inria.fr Subject: Re: [Caml-list] exene and ocaml ? In-Reply-To: <6C27A642-83BE-11D8-96B0-000393863F70@exomi.com> References: <16491.38344.186267.44292@soggy.deldotd.com> <1080807590.13854.260.camel@pelican> <6C27A642-83BE-11D8-96B0-000393863F70@exomi.com> X-Mailer: VM 6.92 under Emacs 21.2.1 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 cancelled:99 model:01 model:01 kludge:01 invoke:01 ocaml:01 writes:01 constructs:02 modules:02 stack:02 stack:02 variable:03 object:03 cleaner:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 23 >>>>> "Ville-Pertti" == Ville-Pertti Keinonen writes: >> Simple: there is no stack. Event handlers have to return, and >> when they do the stack is lost. Ville-Pertti> In Brian's specific example as I understood it, this Ville-Pertti> would not be relevant. Yes I think it would be. My example was just not very good. Let's say you have a drawing program with different drawing tools. Each tool must have local state as it constructs it's respective graphic object. If the different events all invoke the procedure separately, then that state _must_ reside outside of the routine. In addition, if something happens to change state, i.e. the drawing tool is cancelled, there is no other way to communicate that other than by some sort of global variable. It may be possible to adress these problems through the use of modules, but the fact remains, that I can come up with a _much_ cleaner implementation with a persistent procedure than I can with a standard event model. As always, there is more than one way to do it, and certainly I can get things done in the event model approach, but I think it's a kludge. Thanks for you comments. Brian ------------------- 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