Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is your favorite misconception about Lisp? [closed]

Please respond with one by one.

If you explain why it is not true then try to avoid general statements and provide particular examples.

like image 504
Levente Mészáros Avatar asked Sep 24 '08 11:09

Levente Mészáros


People also ask

What is special about Lisp?

A unique feature of early Lisp versions compared to most other programming languages is that the code could be directly interpreted without a compiler. The source code itself could be parsed and interpreted directly on a system.

What is Lisp example?

LISP represents a function call f(x) as (f x). For example, cos(0) is written as (cos 0). LISP expressions are case-insensitive. It makes no difference whether we type (cos 0) or (COS 0).

Why does a Lisp fail?

The reason Lisp failed was because it fragmented, and it fragmented because that was the nature of the language and its domain-specific solution style. The network effect worked in reverse.

Is Lisp hard to read?

Being able to read something quickly only comes with experience. Lisp is no harder to read than any other language. It just so happens that most languages look like C, and most programmers spend most of their time reading that, so it seems like C syntax is easier to read.


3 Answers

many think that lisp is a list-oriented language (whatever that means).

it's a widespread belief, even among lispers, that the one great and most important thing about lisp is the cons cell and the singly linked lists that one can build up using them (sexp's). people who believe that don't understand the real reasons that make lisp a more productive language than the other mainstream languages (this is only my subjective opinion!), and don't understand that lisp could pretty much be what it is without having the cons cell in the game at all.

a random selection of things that are important to make lisp what it is, and that are easily doable without sexp's:

  • REPL
  • compiler available at runtime
  • dynamic typing
  • syntactic abstractions (macros)
  • closures
  • simple syntax which is easy to edit (and to "parse" by the brain)

a few explanations:

simply put, dynamic typing means that not the places have type but the runtime values. this is an important help if you don't know beforehand all your requirements, and your application is constantly transforming as the project evolves. from my experience, this is by far most of the case - only with much more obstacles when static typing is in the picture.

probably many would argue that the cons cell and sexp's are crucial for a flexible macro system. the crucial thing is a simple syntax and a simple to manipulate data structure it is parsed into. the sexp syntax and lists together are a good candidate, but there are many others.

i'm happy with the parens, but i'm not happy with the other part, namely using cons'd lists to represent program code, because it has an important deficiency: you can't annotate it with random stuff without disturbing the data that is already represented with it. e.g. i can't annotate such a cons'd list representing program code with the fact that it was edited by Joe two days ago, without turning that form into nonsense for the lisp compiler. these annotations are more and more important as your DSL's become more complex, and as your macros turn into small compilers compiling your DSL into lisp.

like image 84
Attila Lendvai Avatar answered Oct 21 '22 23:10

Attila Lendvai


That it is a programming language. Today Lisp is a family of programming languages including Common Lisp and Scheme, which are standards with various implementations each, and also Clojure, Arc and many others.

like image 39
pupeno Avatar answered Oct 21 '22 23:10

pupeno


That all the parentheses make code unreadable. After about two weeks, and with a decent text editor, you just stop noticing them.

[ETA - just found a quote by long-time lisper Kenny Tilton: "Parentheses? What parentheses? I haven't noticed any parentheses since my first month of Lisp programming. I like to ask people who complain about parentheses in Lisp if they are bothered by all the spaces between words in a newspaper..."]

like image 25
inglesp Avatar answered Oct 21 '22 22:10

inglesp