Property Lists 
Author Message
 Property Lists

Hello,

since there are, contrary to most Lisp dialects, no property lists in
scheme (at least not in R5RS), although some scheme implementations
nevertheless implement them, I wonder how one can simulate them in all
the other implementations.  Is there a canonical way of doing this or is
this considered `bad behaviour'?  I would really regret if I had to get
along without them.

Any references, hints or suggestions?

Thanks

Andi

--

PGP fingerprint:  6C 84 F3 1B 23 AA 20 53  D1 C2 4A CF DE 1D 62 A8
***  "Why stop now, just when I'm hating it?"  --Marvin  ***



Mon, 22 Oct 2001 03:00:00 GMT  
 Property Lists


Quote:
>since there are, contrary to most Lisp dialects, no property lists in
>scheme (at least not in R5RS), although some scheme implementations
>nevertheless implement them, I wonder how one can simulate them in all
>the other implementations.  Is there a canonical way of doing this or is
>this considered `bad behaviour'?  I would really regret if I had to get
>along without them.

The usual solution is to use some kind of table database, such as an
association list, hash table, etc.  This also allows the keys to be any
data type, not just symbols.

--

GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.



Mon, 22 Oct 2001 03:00:00 GMT  
 Property Lists

Quote:

>Hello,
>since there are, contrary to most Lisp dialects, no property lists in
>scheme (at least not in R5RS), although some scheme implementations
>nevertheless implement them, I wonder how one can simulate them in all
>the other implementations.  Is there a canonical way of doing this or is
>this considered `bad behaviour'?  I would really regret if I had to get
>along without them.

There are some property list implementations in the Scheme Repository,
http://www.cs.indiana.edu/scheme-repository/code.lang.html

--
Darius Bacon    http://www.well.com/~djello



Tue, 23 Oct 2001 03:00:00 GMT  
 Property Lists

Quote:

> > ...
> >Is there a canonical way of [simulating property lists in scheme].
>...
> The usual solution is to use some kind of table database, such as an
> association list, hash table, etc.  This also allows the keys to be any
> data type, not just symbols.

In any implementation where you make heavy use of property lists it
may be necessary to make sure that properties get garbage collected
with the object they are associated with.  Assuring a reasonable
garbage collection time can be difficult when something like a global
hash table is holding its own pointer to the property.

-- Allyn
Allyn Dimock               (617) 495-3998     --free the bound variables--



Tue, 23 Oct 2001 03:00:00 GMT  
 Property Lists
I would really regret if I had to

Quote:
> get
> along without them.

I thought I would too, but turns out I just changed the way I was
thinking about subordinate lists.

I asked for help last week on properties in TinyScheme, which it turns
out seem to be "zombie" features. Not quite able to fix them myself, I
just made sure the objects in question were lists, added
in a subordinate list to hold the properties, and then added in one pair
for each property.

Then I wrote some macros to address the properties, and a loop to search
through them for accessing and overwriting.

If you had to assign properties to any arbitrary object (eg. strings)
then you're right to keep looking. For my case, I'm happy and no longer
worried about portability.

Kirk Zurell
Byte Craft Limited



Sat, 27 Oct 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. CW2.0 Property list???

2. Property Lists in SML?

3. Property lists?

4. LOGO-L> property lists

5. Property list question

6. Property lists in MIT Scheme.

7. Property lists in MIT Scheme.

8. property lists

9. Parsing OpenStep's property lists?

10. Association/property lists in tcl

11. LOGO-L> Re: Property lists?

12. CW List Box Properties

 

 
Powered by phpBB® Forum Software