Newbie Question: Are arguments in a function definition bound when function is called?
Subject: Newbie Question: Are arguments in a function definition bound when function is called?
From: Robert Dodier
Date: Wed, 26 Aug 2009 09:20:39 -0600
On 8/26/09, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
> Assignment (q: ...) and binding set the value slot; function
> definition (q(x) := ...) sets the function slot. When evaluating the
> function call q(...), Maxima first checks the function slot, and only
> if there is no function value does it check the value slot.
For the record, I know we've discussed it before, it seems like
the existing function evaluation scheme is more complex than
it needs to be. As I'm sure you know, it would be simpler to
always look at the value slot or never. Today I'm inclined to
say "always" but it seems to change depending on the weather.
It occurs to me (and I would expect that it's been discussed
in the Lisp-1 vs Lisp-2 literature) that we could have multiple slots
but allow at most one of them to hold something.
FWIW
Robert Dodier