Alessio Stalla <alessiostalla@...> writes:

> 
> On Wed, May 25, 2011 at 4:45 PM, Matthew Swank
> <akopa.gmane.poster@...> wrote:
> > Pascal Costanza <pc@...> writes:
> >
> >>
> >>
> >> On 25 May 2011, at 04:51, Matthew D. Swank wrote:
> >
> >> > However, consider the following:
> >> >
> >> > ((returns-a-function) arg arg ...)
> >> >
> >> > Would it be reasonable to allow this as a legal form as well?
> 
> While in principle I like such a thing, I think it doesn't play well
> with Lisp-2 (or more specifically, with Common Lisp). If ((whatever)
> ...) is a valid expression, then one would expect (let ((foo
> (whatever))) (foo ...)) to be equivalent, but it's not. And you can't
> use flet/labels for the same effect. 

Well, let bindings could be extended to use an operator to specify the 
namespace:

(let (((function foo) (lambda (arg ...) ...))
      (bar  (lambda (arg ...) ...)))
  (foo ...)
  (funcall bar ...))


and flet/labels would transform into a generalized let binding.

This would make the standard transformation of let -> function call a little
problematic, however.

I suppose at the bottom of all this is an implied primitive binding operator for
operators: perhaps flambda!

Matt



_______________________________________________
pro mailing list
pro@common-lisp.net
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro

Reply via email to