3 ms·
Your definition (already rather loose) covers only one direction. The point of homoiconicity is that code and data are the same, so they must be easily intercha
by PeterisP 12y ago
Your definition (already rather loose) covers only one direction. The point of homoiconicity is that code and data are the same, so they must be easily interchangeable both ways, and also during runtime.
Even if you would consider flat text as an acceptable data format for homoiconicity, most languages don't fit that criteria. Can a random program in a random language (not expressly written as a quine) easily obtain itself in this representation? Can I easily write a function that, when passed any arbitrary function as an argument, obtain the flat text representation of that function, modify it, and execute that modified function?
- comex 12y agoDoes this even work properly for Lisps with lexical scoping? I'm not that familiar... Modulo scoping, you can do that in JavaScript.