3 ms·
Yeah I think it is pretty neat too. I had a couple of design ideas. This way I can persist some other structures (from Python for ex): For set(): (#set v1
by rdtsc 14y ago
Yeah I think it is pretty neat too. I had a couple of design ideas. This way I can persist some other structures (from Python for ex):
For set():
(#set v1 v2 ...)
For circular object graphs, I can encode an object reference to avoid serializing the same object twice:
(#ref oid)
Then of course there are custom class names I can pass in to serializer and deserializer:
(#MyClass (attr1 val1) (attr2 val2) ...)
This might not map to all languages but it worked for me.
- pnathan 14y agoCL uses # as a special character; I rewrote the idea into the (CL-standard idiom) `make-map` nomenclature: https://gist.github.com/4709844 https://gist.github.com/4709844 But yea, I hadn't thought of particularly using this idea. It's a good idea from Python (or maybe its older than that, IDK). :-)