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?
> > 
> > I'm not arguing Common Lisp should work this way, but I seems to make
> > sense in the context of a Kernel like evaluator.
> 
> _If_ (returns-a-function) indeed returns a function, then this could be ok. 
> But what if it doesn't return a function? What if it is a macro that
> returns just a symbol? Do you want to risk that ((return-something)
> ...) has a different meaning than (funcall (return-something) ...)?
> This is  potentially confusing and could lead to code that is
> hard to debug...
> 

Yes you'd have to watch for symbols. The idiom would be to coerce values for use
in the car:

((callable (returns-a-function?)) arg arg ...) 

or stick to using funcall.

Matt





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

Reply via email to