upvote
Well, okay Shriram said the term "homoiconicity" is fuzzy, but the underlying thing (the language of data and the language of programs being the same representation) is real and worth taking seriously. Citing him to wave away the whole concept is pretty wild misuse of the citation. They are refining the claim, not negating it.

> doesn't gain anything semantically

Syntactic properties create semantic affordances. The reason "code as data" matters isn't that the parentheses look a certain way - it's that the AST is a first-class citizen of the runtime data model. Those are semantic capabilities - they determine what programs can express and compute, especially at the meta level. The syntactic uniformity is the mechanism; the ability to write programs that construct and transform other programs, using the same tools as everything else, is the payoff.

Homoiconicity doesn't make Lisp programs mean something different, but it gives you a more uniform and powerful meta-programming model.

reply
> Citing him to wave away the whole concept is pretty wild misuse of the citation.

Good thing I didn't do that?

> Syntactic properties create semantic affordances.

I don't disagree with this. Benjamin Pierce defines type-checking in the opening pages of Types and Programming Languages as an operation over syntax, for example.

My point was that the parent comment just kind of threw out "homiconicity" when somebody talked about writing properties about a language in that language, and those are entirely separate things. I was addressing a conflation of terms. The property that people generally refer to as "homoiconicity" is useful for things like writing macros, but it does not directly grant you access to any kind of property-checking capabilitiy. I mean, Rust's macro system is far from homoiconic (it's just an AST), but it gives you semantic capabilities. You know?

reply
it's still far easier to write a metainterpreter to play around with language semantics if you have homoiconic syntax. consider the feasibility of altering the search strategy in prolog compared to changing something about c# linq semantics.
reply