[ prog / sol / mona ]

prog


Marvin Minsky - The Beauty of the Lisp Language

288 2020-10-14 16:13

JSON parsing is a solved problem.
It doesn't require 'reader macros' in C/C++(though you can use something like
stringify([
1, 2, 3, { "complex": 5, "object": [6, 7, 8] }, [[9], 10]
]) to convert it to C string(multiple constant strings are automatically merged to one) for user-friendly constant objects -
most JSON use doesn't involve writing JSON inline but parsing external strings/files.

Extending JSON parsing for specific format is just modifying parser. A scripting language (like LISP) would easily
create a shitty parser by stacking macros/functions,
that would be outperformed by serious
C/C++ parsers, which are build to solve real-world problems:
Parsing lots of JSON files/strings and displaying them to the user.
Showcases how easy is to create a parser in LISP doesn't
make LISP good at writing/extending parser, these toy parsers created to showcases language flexibility aren't used in practice.

301


VIP:

do not edit these