From: | hannah@schlund.de (Hannah Schroeter) |
Newsgroups: | comp.compilers |
Date: | 18 Feb 2005 22:49:12 -0500 |
Organization: | Schlund + Partner AG |
References: | 05-02-05305-02-056 05-02-062 05-02-077 |
Keywords: | functional, practice |
Posted-Date: | 18 Feb 2005 22:49:12 EST |
Hello!
George Neuner <gneuner2@comcast.net> wrote:
>[...]
>Most (all?) of the recognized functional languages allow functions to
>be redefined and anonymous functions to be created, but I don't know
>whether they routinely permit the same kind of run time extension
>possible in Lisp.
Redefinition? When I look at Haskell, SML or ocaml, I don't see a way
to redefine functions (in the sense that you can, at run time, change
the definition).
Okay, in *ML you can define a ref cell which refers to a function of
some specified type and may overwrite it, but this doesn't pose
difficult issues, as you can of course only use lambdas (with their
bodys available to the compiler), already-defined functions (i.e.
body available) or other expressions returning a function to set them,
all of which is representable with a closure (pointer to code which is
known at compile time, and environment, for references to global
functions, the latter may be empty).
So you definitely don't need an interpreter/compiler available at
run-time for neither Haskell nor *ML.
>George
Kind regards,
Hannah.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.