Of what use is 'lambda'???
Jonadab the Unsightly One
jonadab at bright.net
Sun Sep 24 07:01:13 EDT 2000
Guido van Rossum <guido at beopen.com> wrote:
> In elisp (AFAIK), when you define a function, the name you give it is
> globally registered, so you need to make sure it doesn't conflict with
> other functions. Anonymous functions defined with lambda avoid this.
The usual naming conventions avoid this, too. Usually you would
call your function after first the name of the overall package
or module it's a part of, then if applicable the subpackage,
then what it does. So, if you're writing the foo module, and
the component foo-blah has a function that prepares a quux for
a baz operation, you might do this:
(defun foo-blah-quux-prepare-for-baz (arg)
(do-something arg)
(do-another-something arg (foo-blah-baz-whichbaz arg))
(foo-blah-quux-mark-as-ready arg))
[Looks at that...]
Maybe I should shut up now before I make lisp look a
lot worse than it really is.
- jonadab
More information about the Python-list
mailing list