3 ms·
Anyone who adopted JSON could have been using s-expressions all along, but it's become a tradition to ignore everything Lisp got right until some brave soul giv
by prodigal_erik 16y ago
Anyone who adopted JSON could have been using s-expressions all along, but it's become a tradition to ignore everything Lisp got right until some brave soul gives it a makeover with curly braces.
- astine 16y agoIn theory, I'll agree with you. However, as far as I know, there are no s-exp parsing libraries for any language I know but Lisp. Also s-exps as they exist in Lisp assume some Lispish concepts that don't map to all languages. Symbols, for example, don't exist in Java. JSON is a better solution for cross language portability.
- wendroid 16y ago(sorry I want to reply to the reply but there's no reply button for it) Saying there are no s-expression parsers for non-Lisp is ridiculous. This one's http://sexpr.sourceforge.net/ http://sexpr.sourceforge.net/ for C, it's been in sourceforge since 2002. perhaps you prefer one in : Javascript - http://planet.plt-scheme.org/package-source/dherman/javascript.plt/9/0/planet-docs/javascript/pjs.html http://planet.plt-scheme.org/package-source/dherman/javascri... Perl - http://search.cpan.org/~nelhage/Data-SExpression-0.34/lib/Data/SExpression.pm http://search.cpan.org/~nelhage/Data-SExpression-0.34/lib/Da... Limbo - http://man.cat-v.org/inferno/6/sexprs http://man.cat-v.org/inferno/6/sexprs I shan't go on
- astine 16y agoI didn't say that there weren't s-expression parsers for languages other than Lisp; just that I haven't found them. I'll be the first to admit that I haven't really been looking. But you'll note the disparity in support. A library for parsing XML with C may have existed since 2002, but it's existed for XML since 97. In Java, XML support has been baked into the JVM for a while, but S-exp parsers are hard to find. That library you list for Javascript is not a s-exp parser but rather a Scheme library for generating Javascript from a Scheme-like language. Googling for javascript and s-exps returns a lot of results like that but not many s-expression parsers. There certainly aren't any widely used and recognized libraries like there are for XML and JSON fro most languages aside from Lisp.
- deleted 16y ago[deleted]