3 ms·
Just because the standard lisp reader is readily available doesn't mean you should use it for anything else than code or small chunks of trusted data. Was there
by bjoli 6y ago
Just because the standard lisp reader is readily available doesn't mean you should use it for anything else than code or small chunks of trusted data. Was there ever a question of using regular s-expressions in the same way as json? I don't think I have ever heard people suggest that. Most people either talk about using (read ...) to read trusted config files (which is fine) or to define an s-expression format to address specifically the complaints of the article.
As others have pointed out, there is nothing stopping a lisp reader from reading an alist as a hash-table. That is an implementation detail...
- tlb 6y agoIndeed, feeding network-supplied input to a lisp reader is asking for trouble. In principle you can configure a reader to ignore read macros, but every lisp dialect has different footguns. But they're great for application data storage. HN stores everything as s-expressions.