From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA04238 for caml-red; Thu, 24 Aug 2000 09:58:26 +0200 (MET DST) 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 UAA26525 for ; Wed, 23 Aug 2000 20:42:29 +0200 (MET DST) Received: from localhost.localdomain (ike76.zip.com.au [210.23.146.76]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e7NIgPD23278 for ; Wed, 23 Aug 2000 20:42:26 +0200 (MET DST) Received: from maxtal.com.au (IDENT:root@localhost [127.0.0.1]) by localhost.localdomain (8.9.3/8.8.7) with ESMTP id QAA19248; Wed, 23 Aug 2000 16:05:33 +1000 Message-ID: <39A369AD.E640C222@maxtal.com.au> Date: Wed, 23 Aug 2000 16:05:33 +1000 From: John Max Skaller X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: David McClain CC: caml-list@inria.fr Subject: Re: Return type of procedures? References: <002401c00bba$f9ee4ae0$210148bf@dylan> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: weis@pauillac.inria.fr David McClain wrote: > > Is it just me? I am quite troubled by the concepts you propose in a new > language. You chose to use Caml for very good reasons. Why would you do away > with things like immutable global environments for your users? Procedures > altering the environment in such a way as to cause a function to behave > differently on separate invocations seems like it is going against the basic > tenets of FP. The FP approach makes it so easy to reason about the behavior > of programs. Partial evaluation allows customization of functions when > needed. Am I missing something here? Yes: I am required to interface to an existing object oriented event driven system. There is an intrinsic requirement to be able to modify 'state'. In addition, I have to provide a language that other people (familiar with C/C++) can use. But the other thing you miss is that even in ocaml, environments are NOT immutable: there are mutable fields, and thus mutable data structures like Hashtbl. The fact is, some things are easier to express in a stateful manner than a functional one. -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net