[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue DOTTED-MACRO-FORMS



Sounds like a good idea to me.  In fact, I think it would be useful to allow
dotted function invocation forms.  It would make it simpler to code functions
like this:
 
 (defun send-formatted-message (format-text &rest format-args)
  (internal-send-message (apply #'format nil format-text format-args)))
 
Why not be able to say
 
 (defun send-formatted-message (format-text &rest format-args)
  (internal-send-message (format nil format-text . format-args)))
 
This would be meaningful only for functions that are defined to take &REST args,
of course.  
 
I suppose this is reminiscent of the old controversy about destructuring in
function lambda lists (which my implementation supports, mainly because it
would be a PITA to have the destructuring code arbitrarily signal an error
just because it was parsing a DEFUN lambda list instead of a DEFMACRO
lambda list).  But I still think this is useful.  Sure, a compiler could
optimize the (apply #'...), but why should it have to?