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

What you mean is that it only makes sense in homoiconic languages; Lisp is not the only one[1]. In particular, there's Julia, now[2].

[1] http://en.wikipedia.org/wiki/Homoiconicity#Examples

[2] http://docs.julialang.org/en/latest/manual/metaprogramming/




That reminds me of the ancient Infix module for Common Lisp.

    [1]> (load "infix")
    T
    [2]> (let ((a 1) (b 2) (c 3)) #i(a*b+c))
    5
    [3]> '#i(a*b+c)
    (+ (* A B) C)
Like the colon in Julia, we can quote the infix (#i) expression, to reveal its AST.

Infix URL:

http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/l...

Infix has f(x,y) type function calls and a[i,j] type array referencing and whatnot.

It's not really homoiconicity because the AST doesn't resemble the language being quoted. The AST and its printed notation are homoiconic; the LALR(1) statement/expression/infix cruft layered on it arguably isn't.


For adding infix to s-exps, "sweet expressions" are a much cleaner approach: http://www.dwheeler.com/readable/


I'm sure I've seen that before. Anyway, it's destined for the same dustbin as infix.cl. These things have value in showing "see, you can do this, but Lisp programmers don't actually use it". Before infix.cl and Readable, back in the 1970's, there was also something called CGOL[1]. This was described in a 1976 MIT paper by Pratt R. Vaughan titled CGOL: An Alternative External Representation for LISP Users.

And, of course, Lisp wasn't supposed to wear its S-expression underwear on the outside in the first place; M-expressions were supposed to be used for programming.

[1] http://en.wikipedia.org/wiki/CGOL




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: