help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to populate a property list?


From: Kai Grossjohann
Subject: Re: How to populate a property list?
Date: Sun, 31 Oct 2004 15:39:01 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Hattuari <susudata@setidava.kushan.aa> writes:

> I don't believe hash tables are the correct data structure for my
> problem.

What's wrong about hash tables?  Hash tables map keys to values, order
of keys is not significant and keys are unique.  Those are the
properties you were asking for, I think.

I'd use alists, though.  Even though the uniqueness of the values is
not guaranteed, alists are used very often in Emacs lisp and thus any
reader will instantly see what you are getting at.  When people see a
plist instead, they will think:  Why did the author avoid alists?
When people see a hash table, they will think:  This must be getting
big.

Kai





reply via email to

[Prev in Thread] Current Thread [Next in Thread]