|
I thought the idea of function application was to evaluate a function is a given environment, not an environment that comes with the function. Well, I thought the idea was to evaluate it with different arguments, which I see as a separate issue from evaluation with different environments. I don't think our solution should kill the former. The only other solution I can think of is to place new bindings on the tail of the environment, but this solves the problem only by crippling the rest of the system (since this way you could only assign a value to a variable once, and then never change it). Is that a problem? I seem to recall from CS115 that functional programmers view assignment with some distrust and don't consider it the "must-have" feature that it appears to be in imperative languages.
|
functional vs. imperative by Roni Choudhury, 2001, Nov 18
to: