TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Am I missing the Lisp magic?

15 pointsby syberslidderover 12 years ago
I grew up coding in C and the many languages it inspired syntactically. I am currently learning some Erlang, which is cool. I for one can not understand the draw to Lisp or its syntax. It just looks confusing to me and in no way any easier than C to write/read. And looking at C-ish source code is effortless to get the right context but with stuff like )))))) ?? Someone explain please, also I understand some people like Lisp for some of its features, but are they tied to the syntax or can be easily copied over in another language? Also I know why functional programming so lets keep the discussion on the Syntax!

6 comments

magnusjonssonover 12 years ago
If you are looking at the ))))) you are looking at the wrong place. It's like placing your attention on the } } } } in C. Look at the opening parenthesis instead, and more importantly <i>the indentation</i>.<p>The benefit of S-expressions (lisp syntax) is that they make it easy to work with "code as data" instead of "code as text". This in turn makes it easy enough to generate code and define new forms of expression that people can actually do it without blowing the complexity budget.
评论 #4994732 未加载
michaelsbradleyover 12 years ago
Another point is that when programming in a Lisp, it's highly recommended to use an editor/IDE that automatically handles the balancing of parentheses and provides keyboard shortcuts for common transformations of s-expressions.<p>For my day-to-day work with Clojure, Emacs and Paredit[1] meet that need handily.<p>[1] <a href="http://emacswiki.org/emacs/ParEdit" rel="nofollow">http://emacswiki.org/emacs/ParEdit</a><p>See also the Paredit CheatSheet: <a href="http://www.emacswiki.org/emacs/PareditCheatsheet" rel="nofollow">http://www.emacswiki.org/emacs/PareditCheatsheet</a>
michaelsbradleyover 12 years ago
An important aspect of the "Lisp magic" is the language's homoiconicity[1].<p>Scheme, Clojure and other members of the Lisp-family share this language property, but it's not exclusive to lisps[2].<p>[1] <a href="http://en.wikipedia.org/wiki/Homoiconicity" rel="nofollow">http://en.wikipedia.org/wiki/Homoiconicity</a><p>[2] <a href="http://en.wikipedia.org/wiki/Homoiconicity#Examples" rel="nofollow">http://en.wikipedia.org/wiki/Homoiconicity#Examples</a>
debacleover 12 years ago
You can implement the functional aspects of lisp in almost any language, however S-expressions are only present in a very limited number of programming languages.
orangethirtyover 12 years ago
Have you ever written anything with it?
rman666over 12 years ago
(no)