[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to iterate over properties in a plist?
From: |
Marcin Borkowski |
Subject: |
Re: How to iterate over properties in a plist? |
Date: |
Sat, 01 Aug 2015 00:29:35 +0200 |
On 2015-08-01, at 00:18, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> I need to iterate over all properties in a plist.
>
> First things first: go complain to whoever decided to use a plist
> instead of an alist.
Why? I did consider both and decided that a plist will be better in my
use-case. Reasons: it is short anyway (no more than 3-5 properties at
most), and I need to change it frequently (i.e., change the values of
individual properties). This last operation seems much nicer in
a plist. AFAIK, the "canonical" way to change a key-value pair in an
alist is to push the new one at the beginning. In my case, the list
will grow quickly.
> Stefan
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University