Newsgroups: comp.lang.scheme,comp.lang.misc,gnu.misc.discuss
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!news.sprintlink.net!EU.net!julienas!news.fnet.fr!ilog!news
From: davis@ilog.fr (Harley Davis)
Subject: Re: Scheme requires '() to be a true value (was Re: GNU Extension
In-Reply-To: blume@beth.cs.princeton.edu's message of Thu, 3 Nov 1994 15:33:53 GMT
Message-ID: <DAVIS.94Nov4170950@passy.ilog.fr>
Lines: 59
Sender: news@ilog.fr
Nntp-Posting-Host: passy
Organization: Ilog SA, Gentilly, France
References: <9410190420.AA02904@mole.gnu.ai.mit.edu> <MDJ.94Oct23224108@sansca
	<SHOUMAN.94Oct31142257@goofy.cc.utexas.edu>
	<1994Nov1.231028.6677@rosevax.rosemount.com>
	<1994Nov3.030630.1930@kestrel.edu>
	<BLUME.94Nov3103353@beth.cs.princeton.edu>
Date: 04 Nov 1994 16:09:49 GMT
Xref: glinda.oz.cs.cmu.edu comp.lang.scheme:10933 comp.lang.misc:18737 gnu.misc.discuss:19436


In article <BLUME.94Nov3103353@beth.cs.princeton.edu> blume@beth.cs.princeton.edu (Matthias Blume) writes:

      Assume you have a function called LIST, for making a list.
      Also assume FROB returns a list.  Then it's very tempting to write

	 (let ((list (frob y))) ... (fiddle-with list) ...)

   Now we write

	   (let ((list (frob y))) (fiddle-using list)
				  (fiddle-with (list z)) ...)

   Shall we use the new list-constructor or the one that's built-in and
   pass it to fiddle-using?  Is the argument to FIDDLE-WITH an ordinary
   list or one of our FROBnicated ones?

Pass the variable to fiddle-using and use the normal list constructor
for making the list of z.  Not a big deal.  Thousands of Lisp
programmers work that way without any difficulties.

   Separate name spaces for procedures and other values simply don't make
   sense if procedures are first-class citizens of the language.  In
   fact, when you treat them differently, then *by definition* they are
   no longer first-class.

I don't see any connection between namespace issues and
first-classness of certain datatypes.  Are you claiming that
CommonLisp, for instance, doesn't have first-class functions?  You can
still put function objects in normal lexical variables in a Lisp-n,
remember.

   Abstract data types have many alternative implementations, some of
   which are procedure-based, some are not.  If it has a global impact on
   how I have to write my program and on how I have to name my variables
   when I go from one representation to another, then this is a nuisance
   at least, and a maintenance nightmare in most cases.

No, the real nightmare (if such an exaggerated term is justified) is
thinking you're calling the system-defined "list" when you've
innocently named a local variable "list" as well.  Even worse when
that local variable actually contains a function which does something
different from the standard "list" function! Multiple namespace is
appropriate because it is quite rare to want to redefine standard
function names, but, since there are no (or almost no) system-defined
variables which aren't functions, it is reasonable not to have to
worry about them.

-- Harley Davis
-- 

------------------------------------------------------------------------------
motto: Use an integrated object-oriented dynamic language today.
       Write to info@ilog.com and ask about Ilog Talk.
------------------------------------------------------------------------------
Harley Davis                            net: davis@ilog.fr
ILOG S.A.                               tel: +33 1 46 63 66 66
2 Avenue Gallini, BP 85                fax: +33 1 46 63 15 82
94253 Gentilly Cedex, France            url: http://www.ilog.fr/
