logoalt Hacker News

eruyesterday at 7:55 PM3 repliesview on HN

C has homoiconicity: you can represent C source code as C strings.


Replies

so-cal-schemeryesterday at 11:10 PM

You can show this is possible, but it is extremely onerous in comparison.

show 2 replies
Zambyteyesterday at 9:22 PM

You can't natively index into a string and get any C syntactic token out of it besides a char.

jibalyesterday at 8:56 PM

You can't run that code within the language so no, obviously not. And even if you could, strings + eval alone is not homoiconicity--programs are not manipulated by the compiler as unstructured text strings.