home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / lisp / 3349 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  1.7 KB

  1. Path: sparky!uunet!think.com!barmar
  2. From: barmar@think.com (Barry Margolin)
  3. Newsgroups: comp.lang.lisp
  4. Subject: CAR and CDR (was Re: Why Isn't Lisp a Mainstream Language?)
  5. Date: 23 Jan 1993 19:28:39 GMT
  6. Organization: Thinking Machines Corporation, Cambridge MA, USA
  7. Lines: 33
  8. Message-ID: <1js697INNjh@early-bird.think.com>
  9. References: <1993Jan21.230642.18561@netlabs.com> <19930122162651.0.SWM@SUMMER.SCRC.Symbolics.COM>
  10. NNTP-Posting-Host: gandalf.think.com
  11.  
  12. In article <19930122162651.0.SWM@SUMMER.SCRC.Symbolics.COM> SWM@stony-brook.scrc.symbolics.com (Scott McKay) writes:
  13. >I personally think CAR and CDR could have been flushed from the
  14. >language, since FIRST and REST do the exact same thing.  
  15.  
  16. FIRST and REST only make sense when a cons is being used as a chain in a
  17. list.  CAR and CDR make much more sense for conses being used as pairs.
  18. Their lack of preexisting semantics fits in with the abstract nature of
  19. conses: calling them CONS-PART1 and CONS-PART2, for instance, would imply
  20. an ordering to the components that doesn't necessarily exist.  Flushing CAR
  21. and CDR would make almost as little sense as flushing NOT because it's
  22. equivalent to NULL.
  23.  
  24. Perhaps conses as fundamental data types should have been removed when
  25. DEFSTRUCT was included in the standard.  CONS could be defined as:
  26.  
  27. (defstruct (cons (:conc-name ""))
  28.   car cdr)
  29.  
  30. >  What machines
  31. >directly execute mapping operators?  Reduction operators?  
  32.  
  33. Connection Machines!
  34.  
  35. >                                What machines
  36. >directly execute generic arithmetic, including integers, large integers,
  37. >floating point, and ratios?  
  38.  
  39. Lisp Machines?
  40. -- 
  41. Barry Margolin
  42. System Manager, Thinking Machines Corp.
  43.  
  44. barmar@think.com          {uunet,harvard}!think!barmar
  45.