3 ms·
Think of it more in terms of how the language is specified. Common Lisp is specified in terms of data structure, not text, and you can depend on that particular
by p_l 6y ago
Think of it more in terms of how the language is specified. Common Lisp is specified in terms of data structure, not text, and you can depend on that particular data structure and manipulate it etc.
a 3rd party library that, to be portable, needs to ultimately serialize to text, does not support homoiconicity.
- sanderjd 6y agoIs it really specified in terms of data structure? Are there not rules in the language specification regarding how s-expressions are parsed? Could I create a, for instance, C-like syntax that parses to and can be serialized from this data structure specification, and call that a valid Common Lisp? If so, neat! I do think more languages should be less defined by their concrete syntax.
- p_l 6y agoYes - the standard does cover "Common Lisp Reader", but it's essentially a self-contained chapter - every special form, standard macro etc. is defined in term of the data structures. So what you'd have is, at most, an extension - to be compatible with Common Lisp, CL:READ would still need to read S-Expressions with standard readable, and CL:WRITE write S-Expressions, but nothing stops you from adding extra reader that uses a different syntax.