4 ms·
A Critique of Homoiconicity
- macmac 11y agoI have literally never seen any examples of any of these "issues" tripping anyone up - even complete Clojure newbies.
- hellofunk 11y agoI generally agree with you. But in complex macros, it can sometimes be confusing to a newbie to understand what is and is not quoted, especially with nested quotes. But most newbies probably shouldn't be spending their time writing complex macros.
- lispm 11y agoThe presentation of evaluation is confusing. He also claims that it has simple syntax and semantics, which is not true at all. Most real Lisps have complex syntax due to special operators, macros and various extensions to s-expressions. Also semantics of the special operators and the macros is far from trivial. The first comment claims that because there is syntax for vextors, the language is not homoiconic (a term I don't like at all), which is also not true. Confusion all around. Generally it is true though, that the code is data / data can be code feature of Lisp makes understanding source code more difficult. A language without that feature is easier to understand. Then there is the issue of syntax based on prefix expressions. Whether this is easier or not depends and is not that clear. Is code with fully parenthized prefix expressions actually easier to understand than a syntax with mixed (prefix, infix, postfix) expressions and a complex operator hierarchy?
- lispm 11y agoInstead of this evaluation notation: (list (list 1 2) nil) -> (list (1 2) nil) -> (list (1 2) ()) -> ((1 2) ()) we write for example: (list (list 1 2) nil) -> (list {(1 2)} nil) -> (list {(1 2)} {()}) -> {((1 2) ())} Use curly brackets to identify which arguments have been evaluated to values. See for example: http://www.cs.uml.edu/~dimock/courses/opl/Handouts/TheSubstitutionModel.pdf http://www.cs.uml.edu/~dimock/courses/opl/Handouts/TheSubsti...