Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!crdgw1!rpi!sci.ccny.cuny.edu!phri!marob!cowan From: cowan@marob.masa.com (John Cowan) Newsgroups: comp.lang.lisp Subject: Re: FALSE vs empty list Message-ID: <26E7C356.5DE7@marob.masa.com> Date: 7 Sep 90 15:57:10 GMT References: <24305@uflorida.cis.ufl.EDU> <1350029@otter.hpl.hp.com> Organization: ESCC, New York City Lines: 25 In article <1350029@otter.hpl.hp.com>, sfk@otter.hpl.hp.com (Steve Knight) writes: >The type-distinctness of empty-list and false in a Lisp or Lisp-like >language is an aesthetic consideration. Many folks, and I'd include myself, >believe that making them distinct is more convenient and makes programs >more readable. Ultimately, our arguments must boil down to "I don't think >of an empty list and false in the same way. I don't think that applying >boolean operators to lists makes good programming practice." and so on. Something that Lispers never seem to address, but is the case in Smalltalk, is the distinctness of the empty list and the undefined datum. In Smalltalk, nil, false, and () are completely different: they have different types. I find this to be extremely useful. For example, this neatly solves the problem of representing the difference between knowledge of nothing and ignorance. () represents knowing that something has no elements, whereas nil represents ignorance. This solves the problem of returning a list of bindings vs. returning failure. Is there any dialect of Lisp in which such a distinction is made? I know that Scheme optionally distinguishes between #f (false) and '() (the empty list), but does anyone distinguish between #f, '(), and #nil, or the like? -- cowan@marob.masa.com (aka ...!hombre!marob!cowan) e'osai ko sarji la lojban