Why are the terms “passing source code” and “passing a lambda” being used interchangeably? My experience with functional programming does not allow for any inspection into a lambda except by experimentation, whereas “passing the source code” implies more direct knowledge of its internals.
I don’t see any other occurrences of “a lambda” on this page, but maybe the original post has been edited.
I would assume that “a lambda” should be taken as short for “a lambda expression”, i.e. an evaluatable s-expression (a form, in Common Lisp terminology; it is unclear to me whether Scheme has a corresponding word). The result of evaluating a lambda expression is not “a lambda”, it is “a procedure [value]”. Procedures (‘functions’ in most languages) have the opaqueness you are thinking of.
(Irrelevant to this question, but relevant to the topic of use/mention, expression/value, syntax/semantics, distinctions in programming: The process of obtaining a procedure/function essentially involves three inputs:
the lambda expression (or other form of function definition),
the environment for free variables (or other form of context/stdlib/set-of-primitives), and
the evaluator (or “the language implementation”)
One of the things language designers can play with is what goes in part 2 and what goes in part 3.)
I don’t see any other occurrences of “a lambda” on this page, but maybe the original post has been edited.
I would assume that “a lambda” should be taken as short for “a lambda expression”, i.e. an evaluatable s-expression (a form, in Common Lisp terminology; it is unclear to me whether Scheme has a corresponding word). The result of evaluating a lambda expression is not “a lambda”, it is “a procedure [value]”. Procedures (‘functions’ in most languages) have the opaqueness you are thinking of.
(Irrelevant to this question, but relevant to the topic of use/mention, expression/value, syntax/semantics, distinctions in programming: The process of obtaining a procedure/function essentially involves three inputs:
the lambda expression (or other form of function definition),
the environment for free variables (or other form of context/stdlib/set-of-primitives), and
the evaluator (or “the language implementation”)
One of the things language designers can play with is what goes in part 2 and what goes in part 3.)