Re: [Scheme-reports] Proposal to add fexprs
Vassil Nikolov 18 Nov 2013 01:36 UTC
John Cowan <cowan@mercury.ccil.org> wrote:
> Vassil Nikolov scripsit:
>
> > But I think the latter is (also) because with `apply', the arguments
> > to the function being applied have already been evaluated;
>
> Just so. So when you call (apply fexpr a b), the variables a and b are
> evaluated to S-expressions, and then the fexpr may or may not decide to
> evaluate the S-expressions further in terms of some reified
> environment.
And b had better evaluate to a list of
S-expressions that can be evaluated by
the fexpr. But in any case, unlike (f a b),
(apply f x) can work either for a function
f or a fexpr f, but cannot be "agnostic" to
whether it is one or the other case.
(Apparently, the author(s) of Kernel
simply decided to prohibit the latter
case.)
I am not advocating fexprs at all, just
pointing out various aspects of having
them in a language.
---Vassil.
--
Would you like your metaphors shaken or stirred?
Vassil Nikolov | Васил Николов | <vnikolov@pobox.com>
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports