Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!darwin.sura.net!lhc!lhc!hunter
From: hunter@work.nlm.nih.gov (Larry Hunter)
Subject: Re: Urgent! Help! Return more than one argument
In-Reply-To: numrich@abmx.rz.rwth-aachen.de's message of 14 Dec 1994 11:45:18 GMT
Message-ID: <HUNTER.94Dec14170333@work.nlm.nih.gov>
Sender: news@nlm.nih.gov
Reply-To: Hunter@nlm.nih.gov
Organization: National Library of Medicine
References: <3cmlse$7v4@urmel.informatik.rwth-aachen.de>
Date: 14 Dec 1994 22:03:33 GMT
Lines: 22


Just a minor follow-on to the discussion of "Why use VALUES?"

Not only is it nice to be able to return more than one value for the reasons
others have pointed out, it is also nice to be able to return LESS than one
value (i.e. none) in certain situations.  Side-effecting functions need not
(and often should not) return anything.  I find it good programming practice
to end most of my side effecting function definitions with "(VALUES)" to
ensure that nothing depends on what they return incidentally.  In addition
to the style question, in some compilers, function calls with no returns are
compiled more efficiently than ones with returns that are ignored.

Larry
--
Lawrence Hunter, PhD.
National Library of Medicine
Bldg. 38A, 9th floor
Bethesda. MD 20894 USA
tel: +1 (301) 496-9300
fax: +1 (301) 496-0673 
internet: hunter@nlm.nih.gov
encryption: RIPEM via server; PGP via "finger hunter@work.nlm.nih.gov"
