Newsgroups: comp.lang.scheme
Path: utzoo!utgpu!cunews!micor!latour!mcr
From: mcr@Latour.Sandelman.OCUnix.On.Ca (Michael Richardson)
Subject: Property lists in MIT Scheme.
Message-ID: <1990Dec15.075421.15379@Latour.Sandelman.OCUnix.On.Ca>
Summary: hashing them? Rationals?
Reply-To: fts1!latour!mcr@alfred.ccs.carleton.ca
Organization: Sandelman Software Works, Debugging Department, Ottawa, ON
Date: Sat, 15 Dec 90 07:54:21 GMT


  While bored between classes I started playing with building some
sort of symbolic differentiation program (I'm a physics student. I
hate differentiating things like spherical coordinates, etc...).
  TI-Scheme was around on some PCs in one lab so I started with that.
In my style of lisp, I use a lot of property lists --- my friendly
interaction loops usually say something like:
  (do ((cmd (read) (read)))
      ((eqv? cmd 'q))
     ((getprop cmd 'shell)))

  TI-Scheme has putprop/getprop.

  Now that exams have started, I've got around to compiling
MIT Scheme (6.1.2, Microcode 10.2, runtime 13.91, sf 3.13). I 
discovered to my amusement that property lists seem to be absent.
Okay, I says, is assq a primitive? Seems to be. No problem. 

  While grep'ing through the runtime code and microcode for 
references to property lists, I noticed a bunch of stuff on hash
functions, etc... Is there, (already existing?) some code to do 
property list-like things using hash codes? 
  I've read R^3S (quite awhile ago), but haven't haven't gotten
TeX up so I can print off the R^4S included in the docs. There is 
a hacked up copy of one of them (I don't remember which) with the 
TI-Scheme 'manuals' in the CS labs. They actually don't mention
property lists at all (that I remember).
  Were property lists dropped in scheme? Why?

[  I'm sorry, I'm new to Scheme --- but I've written some very
nice (I think) Lisp interpreters. My favorite one attached a 
'SUBRn' property to a symbol to give it a primitive definition.
The SUBRn symbol had a property called '*NUMBER-OF-ARGUMENTS*' that
told how many arguments this primitive received. One could define
new kinds of primitive invocation methods via similar methods. I
was working on a property list cache at the time... If this 
sounds like Anatomy of Lisp, it is. ]

  On a somewhat related note --- I believe that there is a 6.2
MIT Scheme no? Has anyone implemented the rational types? Does
6.2 have them? I read a comment here a couple of days ago stating 
that including rationals in the definition was a mistake. I'm 
curious as to why? Can anyone expand on this comment? 
  
  Please note Reply-To: if email'ing.
-- 
   :!mcr!:            |    The postmaster never          |  So much mail,
   Michael Richardson |            resolves twice.       |  so few cycles.
 mcr@julie.UUCP/michael@fts1.UUCP/mcr@doe.carleton.ca -- Domain address
    - Pay attention only to _MY_ opinions. -         registration in progress.
