Hacker News new | past | comments | ask | show | jobs | submit login

I would like to see a mature language using fexprs. They are what I first thought about when I heard the word homoiconicity. Macros seem inelegant in comparison (since there is a separate layer of code that operates on code, and also you don't get self-modifying code, just compile-time transformations).



Rebol family of languages (including Red) uses near equivalents of fexprs.

Here's a self-modifying function ;^)

  >> foo: has [x][append body-of context? 'x [+ 1] 1]
  == func [/local x][append body-of context? 'x [+ 1] 1]
  >> loop 3 [probe foo]
  1
  2
  3
  == 3
  >> ?? foo
  foo: func [/local x][append body-of context? 'x [+ 1] 1 + 1 + 1 + 1]




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: