>Lisp at core is based on functional programing on lists.
Lisp is not, nor has it ever been, a functional programming language. It had lambda decades before other languages figured out it was a good idea, but it had set! for just as long.
It is also not a list based language, but a tree based one. The fundamental point of lisps is that you can manipulate the abstract syntax tree directly since it's pretty much the same thing as the parse tree.
>Deep Nesting is Rare
>The lisp's cons [...] works just fine when data structure used is simple. [...] vast majority of list usage is just simple flat list, sometimes 2 level of nesting [...] 3 levels of nesting is seldom used [...] Greater than 3 level is rarely seen. Systematic manipulation and exploitation of nested list, such as mapping to leafs, to particular level, transposition by permutation on level, or list structure pattern matching in today's functional langs, etc is hardly ever to be seen.
I guess the author has never used lisp to implement a DSL in lisp. Writing a lisp interpreted in lisp is the first real program you write if you take a lisp course at university and you need to handle arbitrarily nested expressions.
Real world usage also involves writing a specialist language to solve your problem for anything more complex than a utility script, e.g. Emacs is a text editing DSL implemented in elisp.
> 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/...
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.
- [deleted]
LISP had FEXPRs from the beginning though. Not identical to macros, but similar in spirit.
> Lisp is not, nor has it ever been, a functional programming language. It had lambda decades before other languages figured out it was a good idea, but it had set! for just as long.
"Functional programming" used to just mean having first-class functions that you could pass as arguments and return from functions. Lisp has always been functional. It's never been purely functional, which is a different thing - concerning itself with referential transparency rather than first-class functions.
Only true, if we take for granted that nowadays for whatever reason the common folks understanding of FP is whatever Haskell does.
I was around when FP papers still discussed Miranda, and Lisp was certainly taught as FP language.
I'm not sure but I kinda recall some old lisper saying they added imperative features due to idioms outside of the lisp lab. `progn` was a way to appeal to fortran coders, i believe `set!` was in the same bag..
set! is from Scheme. Lisp has had set and setq since the beginning along with prog (I don't know when progn was added).
The LISP I manual describes the program feature as being "like a FORTRAN program with LISP statements", but that's not the same as saying it is there to appeal to Fortran programmers.
https://www.mirrorservice.org/sites/www.bitsavers.org/pdf/mi...
i'm just wondering if mccarthy and early designers were haskellers (pardon the anachronism) in spirit (pure recursive functions, as in the symbolic derivator example) or freeform programming.
The author is reknowned for eMacs lisp.
The author is renowned for flame wars on comp.lang.lisp which boil down to "Hey guys, why isn't lisp mathematica?".
The author is used be in the killfile, so you don't have endure his endless wrongs
What is a killfile?
From the old Usenet days, a killfile told your client to ignore all messages from particular people (those in the killfile). A block list, but with a more aggressive name.
And you didn't need to beg a forum administrator to cancel a certain individual, you did it by yourself. But only for yourself. Similar to Youtube chats nowadays. No need for cancel culture and drama.