DEV Community

Discussion on: The Idea of Lisp

Collapse
 
ben profile image
Ben Halpern

It's hard for me to even conceptualize writing a program without the concepts introduced by Lisp. These ideas are truly enduring. Why is it that we don't put more focus on this history when we teach CS?

Collapse
 
koyedele profile image
Kunle Oyedele

"Why is it that we don't put more focus on this history when we teach CS?" I couldn't agree more. It appears "Computer Science" is the one "science" in which we don't really consider the history of the field itself, and the people who made significant contributions to it. Maybe that's why we keep reinventing the wheel.

Collapse
 
tbodt profile image
tbodt

I recently learned Lisp and thought it was the stupidest language in the world because it has no random access data structures, which are crucial to computers actually working. That's still true, but now I see that there are other things about the language which makes it great.

Collapse
 
psionski profile image
Vladislav Zorov

It's not that it doesn't have them, they're just not the preferred solution. Common Lisp has arrays (fixed size or dynamic), hash tables and everything - you use them when optimizing your program's performance.

Collapse
 
davidawheeler profile image
David A. Wheeler

The Lisp-based languages that people generally use have random access data structures - they just may have different names than you're expecting. Common Lisp has the general construct of an array, and a specialized version called a vector. In Scheme they are called vectors: r6rs.org/final/html/r6rs/r6rs-Z-H-... . Similarly, Clojure has vectors.

Collapse
 
ben profile image
Ben Halpern

But isn't that the whole point? I would expect Lisp, in practicality, to be kind of stupid, because everything that came after it is essentially building off of it. But the idea of Lisp and the history of how it came about is every bit as fundamental as other concepts that get way more attention.

Thread Thread
 
tbodt profile image
tbodt

Exactly.

 
psionski profile image
Vladislav Zorov

And you'd be oh so wrong :)

Lisp doesn't just come first, it also evolves fastest (remember the article above? That it encourages experimentation in language design?)

For example the OOP features of Common Lisp (CLOS) are still unmatched by any other language. The "exception handling" (called conditions) are also much more advanced than elsewhere.

And what didn't originate in Lisp, Lisp can often trivially steal. There are libraries on the Internet that can make it have the features of pretty much any language and paradigm you want (coroutines, logic programming, whatever).

Collapse
 
ericnormand profile image
Eric Normand

What dialect of Lisp did you use? Are you sure it didn't have random access data structures? Of course Lispers know the importance of indexed arrays.

Collapse
 
metacritical profile image
Pankaj Doharey

That is not true, Lisp is not all about linked list. Optimised maps exist in all major lisps which are essentially Random access. Also Self balancing binary search trees can be easily implemented which are a good compromise, the only community that is keen on Random Access DS is the Haskell community which spends all its energy and resources in writing research papers on "Sieve of Eratosthenes" instead of doing something more productive.