Hacker News new | ask | show | jobs
by johnnyjeans 360 days ago
> but it had set! for just as long.

Purity has nothing to do with functional programming.

> It is also not a list based language, but a tree based one.

It's not called Trep, it's called Lisp. Yes, you can represent trees as lists embedded in lists, and the cons cell allows that thanks to type recursion. But it's still based around lists. Trees don't allow cycles, lists formed from ordered pairs do. Every single piece of literature written by McCarthy talks about lists[1].

> The fundamental point of lisps is that you can manipulate the abstract syntax tree directly

Macros weren't introduced until 1963[2]. They might be the reason you use a Lisp, and they may have become synonymous with Lisp after 1.5, but they are not a "fundamental point" of Lisp. The fundamental point was always about lambda calculus[1].

[1] - https://history.siam.org/sup/Fox_1960_LISP.pdf

[2] - http://bitsavers.informatik.uni-stuttgart.de/pdf/mit/ai/aim/...

2 comments

From even before Lisp was implemented for the first time, MacCarthy envisioned it as a langauge for symbolic processing: manipulating representations of formulas, exhibiting nesting. So yes, it was actually tree processing, using lists.

When Lisp was implemented for the first time, the evaluation semantics was already expressed as operations on a tree.

LISP had FEXPRs from the beginning though. Not identical to macros, but similar in spirit.