[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | John Max Skaller <skaller@m...> |
| Subject: | Re: Return type of procedures? |
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