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: Stavros Macrakis
Date: Wed, 26 Aug 2009 12:42:34 -0400
Robert,
It may be a "mis-feature", that is, a badly designed feature, but it is not
a bug since it was explicitly designed to work this way, following the lead
of the Lisp systems (called in retrospect Lisp-2) that existed at the time
it was designed.
On the other hand, the interactions with the noun/verb scheme and with
subscripted functions (say psi) may not have been thought though very
carefully.
Thus:
f(psi):=psi[1](1)$
f(sin) => sin[1](1)
but
f(tan):=tan(1)$
f(sin) => tan(1)
-s
On Wed, Aug 26, 2009 at 12:21 PM, Robert Dodier <robert.dodier at gmail.com>wrote:
> On Wed, Aug 26, 2009 at 9:21 AM, Stavros Macrakis<macrakis at alum.mit.edu>
> wrote:
>
> > It binds the dummy variable, but in the expression f(3), f is a reference
> to
> > the *function value* of f if there is one, and only if it is not is it
> the
> > value binding.
> >
> > Does that make it any clearer?
>
> Well, this is just a rephrasing of what the existing code does, right?
> There aren't any fundamental principals in play here.
>
> Just trying to make it clear to the original poster that the
> present, confused state of affairs is more a bug than a feature.
>
> Robert Dodier
>