Quoting from the (1975) Maclisp Reference Manual: "Each atomic symbol has associated with it a property-list, which can be retrieved with the plist function."
A Maclisp property-list was a list of 'indicator/value' pairs. In Maclisp,
(get x y)
gets x's y-property.
(putprop x 'banana y)
sets x's y-property to banana.
I am tasked with converting a lot of old Maclisp code into Clojure. I am new to Clojure but won't be for long as this project unfolds. Before I run off and write something myself, I'm wondering if Clojure already has a "property list" feature? Or something close?
And if not, what would the assembled Clojure gods have me do to implement such a feature? Remember, every atomic symbol in Maclisp can but does not have to have a property-list. Thank you.
clojure has metadata maps associated with variables / data values:
notice that this metadata is associated with variable, not with variable bound data
otherwise you can attach it to the value itself:
depending on how do you want to use it.