🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98325

Hint to improve readability of optional arguments

#98325
From: Jonas Jaernestroem TG/HDK
Date: Mon, 14 Oct 1991 23:27
24 lines
1536 bytes
In GNU Emacs 18.55.4 of Tue Mar 20 1990 on nericad (berkeley-unix)

I would like to pass on a hint from Scott D Kalter (sdk@twinsun.com)
on how to improve the readability of optional argument switches.
It is normally hard to remember what they do since there's a wealth of them.

"When using these optional arguments, they often
need only to be non-nil which is a great opportunity to put some
"documentation" of what you are doing in there!  For instance, if we
want query-replace to replace words only, we normally write like this :

      (query-replace arg1 arg2 t)

But this is equivalent and much clearer :

      (query-replace arg1 arg2 'match-words)

Now when you look at that call again, you might have a chance of
remembering what that third argument means."


Jonas Jaernestroem              email:  etxjojm@ericad.ericsson.se
Ericsson Telecom STOCKHOLM     
                          
Technical Details
Message-ID: <9110141739.AA20931@ericad.ericsson.se>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!ericad.ericsson.SE!etxjojm

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,43af93d088920349,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-10-15 05:50:06 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!ericad.ericsson.SE!etxjojm
From: etxjojm@ericad.ericsson.SE (Jonas Jaernestroem TG/HDK)
Newsgroups: gnu.emacs.bug
Subject: Hint to improve readability of optional arguments
Message-ID: <9110141739.AA20931@ericad.ericsson.se>
Date: 14 Oct 91 23:27:09 GMT
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 24
Approved: bug-gnu-emacs@prep.ai.mit.edu