Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

While 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.


view as:

Of 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".

I'm not clear on its advantages for the serialization of Smalltalk objects. Would the deserializer be written in a Lisp?

You 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.)


Legal | privacy