3 ms·
I prefer LISP notation, because it naturally allows to store functions.
by amelius 10y ago
I prefer LISP notation, because it naturally allows to store functions.
- anthay 10y agoI made a basic LISP-like JSON-like thing: http://loonfile.info http://loonfile.info
- dottedmag 10y agoYou might want to check out https://github.com/edn-format/edn https://github.com/edn-format/edn
- brudgers 10y agoWhile I love to sing love songs to Lisp, I see Lisp's notation as naturally allowing the storage of lists and the storage of functions/macros/structs etc. as a matter of interpretation at a higher level of abstraction where the language semantics live instead of its notation.
- amelius 10y agoOf course, but try to do it e.g. in JSON, and you'll see that the resulting representation quickly becomes convoluted. In contrast, the LISP notation is basically the same notation as you'd use in the language LISP itself. That's what I mean by "natural".
- brudgers 10y agoI'm not clear on its advantages for the serialization of Smalltalk objects. Would the deserializer be written in a Lisp?
- jimbokun 10y agoYou can treat the serialized S-expressions literally as Lisp code. The first token of the list could be the name of a macro, for example, that could expand into any kind of code you want to execute. (So yeah, you better be really, really sure you control the data you are processing this way.)