emacs-devel
[Top][All Lists]
Advanced

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

Re: Moving files from lisp/gnus/ to lisp/net/?


From: Daiki Ueno
Subject: Re: Moving files from lisp/gnus/ to lisp/net/?
Date: Mon, 12 Nov 2007 17:54:19 +0900

2007/11/12, Richard Stallman <address@hidden>:
> If the only desired operation is to read a password and see if it is
> in the cache, then I think we should give `read-passwd' an optional
> KEY argument and make it just check the cache, not add.  That won't
> lead to the previously described code-copying problem, because the
> cache will not have passwords for the new application unless it also
> has calls to add to the cache.

Exactly.  But I'm still in doubt that it is worth adding an optional
KEY argument to `read-passwd'.  It will indeed reduces the code from:

(let ((password (or (password-read-from-cache key)
                    (read-passwd "Password: " confirm default))))
  ... use PASSWORD, and/or check its validity ...
  (if password-should-be-cached
      (password-cache-add key password)))

to:

(let ((password (read-passwd "Password: " confirm default key)))
  ... use PASSWORD, and/or check its validity ...
  (if password-should-be-cached
      (password-cache-add key password)))

This will help programmers only a little, and speaking of this kind of
"risky" code, we should rather require programmers to type more
letters than ordinary code, I think.

Regards,
-- 
Daiki Ueno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]