I had the same thought about Lisp when I first saw this post, but after looking around a bit, I wasn't able to find any way to do this properly in Common Lisp.
It seems to me that this is exactly what you want:
(defun myfunction (&rest args) ...)
In the body of myfunction, the parameter args is bound to the entire argument list, which is analogous to @_ in Perl.
I don't understand your point about &optional. I thought we were looking for a way to simulate Perl's parameter-passing mechanism in Common Lisp; this is it. Perl doesn't have &optional; instead, you're supposed to examine the contents of @_ and make a decision depending on how many elements it contains. With the args parameter above, you are free to do the same thing in the same way.
--
Mark Dominus
Perl Paraphernalia
In reply to Re: C# reinvents @_
by Dominus
in thread C# reinvents @_
by stefp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |