* Matthias Koeppe [2007-01-07 13:55+0100] writes:
I have been using defun* myself in SLIME code. The Emacs Lisp code of SLIME contains many CL-isms; could people (Helmut, Edi) please comment what is the specific problem with defun*?
Emacs Lisp code should look like idiomatic Emacs Lisp not like CL. Mindlessly applied CL-isms should be removed.
Keyword args are a win if the function has lots of arguments (> 5). For some functions it's reasonable to have lots of parameters, e.g. stuff that is called from a config file or things that implement Little Languages like format or loop. (Or functions which need to be backward compatible, though that's a non-issue for Slime.)
But almost any other function should have few arguments, because more arguments almost always lead more complicated code. It's IMO better to have lots of short functions with few args, than a few functions with lots of arguments. defun* encourages lots of args and complicated code.
Emacs Lisp puts a nice limit on the number of arguments: as soon as you want to add keyword args, you know that you have already to many arguments.
Despite that, backtraces and docstrings for defun* are notoriously unhelpful.
Helmut.