Here's a summary of the themes expressed in the Hacker News discussion:
The Enduring Nature of S-expressions (Parentheses)
A significant portion of the discussion revolves around the use of S-expressions, Lisp's fundamental data and code structure, and the historical attempts to move away from them. Many users express the view that S-expressions, despite their appearance, are a core advantage of Lisp, enabling powerful code manipulation and symbolic editing.
- drob518 states: "The secret is that Lispers actually view sexprs as an advantage, not something to be worked around. Once you discover symbolic editing and code manipulation based on sexprs, youâll never go back to weak line editing."
- drob518 also mentions: "Even John McCarthy, the inventor (discoverer?) of Lisp had plans for an âM-expressionâ syntax to replace âS-expressions.â It never happened."
- tmtvl echoes this, noting: "Yes, and it has never stuck. Even the great John McCarthy, the very creator of Lisp, couldn't manage it..."
Some Lisp dialects are noted for their pragmatic use of other bracket types.
- drob518 observes: "That said, some Lisp dialects (e.g. Clojure and Racket) have embraced other symbols like square and curly brackets to keep the code more terse overall and optically break up longer runs of parentheses."
- xedrac agrees: "I actually really appreciate Racket's judicious use of square brackets in let expressions. It just makes visual parsing that much easier."
- drob518 further elaborates on the benefits of mixed brackets: "Exactly. I also like Clojureâs use of square brackets for vectors and curly braces for maps. It eliminates all the âvector-â and âmap-â function calls."
Lisp as a Conceptual Framework and Its Relation to Lambda Calculus
The discussion touches on Lisp's foundational nature and its deep connection to mathematical and computational theory, particularly lambda calculus. The question of whether Lisp is simply an implementation of lambda calculus or extends it is explored.
- nils-m-holm initiates this line of thought by stating: "Second edition, with a new chapter on lambda calculus."
- Later, nils-m-holm clarifies: "The environment in (lexically scoped) LISP is an implementation detail. Lambda calculus does not need an environment, because variables are substituted on a sheet of paper. So lambda calculus equals lexically-scoped LAMBDA in LISP. Sure, you could view LISP as LC plus some extra functions (that are not easily implemented in LC)."
- This sentiment is echoed by tug2024 (quoted by nils-m-holm): "Doesnât lisp extend lambda calculus (abstraction . application)? As a consequence, lisp (abstraction . application . environment)!" which nils-m-holm calls "Another valid question downvoted into oblivion."
The Author's Motivation and the "Lisp from Nothing" Ethos
A significant portion of the conversation is dedicated to the author of the books discussed, particularly "Lisp from Nothing." Users express admiration for the author's work, describing it as unique, beautiful, and a personal journey, and inquire about the author's motivations.
- vkazanov, after reading the author's books, comments: "These works are something I both understand and would never achieve myself. These are cultural artifacts, like deeply personal poetry, made purely for the process of it. Not practically useful, not state of the art, not research level, but... a personal journey?"
- AlexeyBrin supports this: "I second this, would be great if someone did a long form video interview with the author."
- The author, nils-m-holm, responds to this sentiment by stating: "My motivation is just the creation of something I find beautiful. The vision, to pass knowledge to those who seek it in the simplest possible way, where 'simple' does not necessarily mean in the tersest form, but in a form that invites being digested."
- The interpretation of the title "Lisp from Nothing" is also debated, with users discussing whether it implies starting from scratch or a more existential "nothing." hermicrab highlights a perceived contradiction: "The title 'Lisp from nothing' doesn't seem to fit with: 'INTENDED AUDIENCE This is not an introduction to LISP.' on page 10." gentooflux offers a clarification: "Nothing as in 'from scratch', as opposed to Nothing as in 'Visual Basic's NULL'."
The Appeal and Role of Metacircular Evaluators in the Lisp Community
The importance placed on metacircular evaluators within the Lisp community is questioned by one user, who finds them aesthetically pleasing and instructional but struggles to grasp their central focus.
- C-x_C-f expresses their confusion: "I love Lisp (I'm an Emacs user and often write in Racket for personal projects) but the one thing I never understood about the Lisp community is the emphasis placed on metacircular evaluators. I sure find them beautiful and all, but why do they take center stage so often? Beside the aesthetics and instructional value, I don't get the appeal."
- Quitschquat offers a perspective on this, suggesting: "Long time lisper. It just doesnât feel right unless your language can compile your language. Itâs like wearing someone elseâs underwear."
Lisp's Readability and Code Structure Compared to Other Languages
The discussion briefly compares Lisp's nesting and notation with other programming paradigms, touching on the naturalness of function nesting and the role of error handling in how code is structured.
- jbritton posits: "I sometimes wonder if the issue is really the parentheses or the ease of nesting. In LISP itâs natural to write (f (g (h x))). Whereas most people are used to. a = h(x); b = g(a); c = f(b);"
- jrapdx3 responds to this, finding Lisp's form more immediately understandable: "Interesting comment. I found the lisp/sexpr form instantly understandable. While the others weren't hard to grasp it took a moment to consciously parse them before their meaning was as clear." They also note that preference often comes down to familiarity: "More likely than not it's a matter of what a person gets used to."
Novel Syntactic Variations and Lisp's History
One user introduces a concrete example of a custom Lisp-like syntax that lessens the reliance on traditional parentheses, demonstrating that such experiments are both ongoing and have historical precedent.
- gritzko shares an example of their RDX notation: "So, I styled it to look less alien to a curly-braced developer. Like this https://github.com/gritzko/go-rdx/blob/main/test/13-getput.j... for example, print change-dir make-dir; is equivalent to (print (change-dir (make-dir) ) ) in the old money. I wonder if I am reinventing too much here."
- drob518 points to past attempts: "There have been many attempts to get rid of sexprs in favor of a âbetterâ syntax. Even John McCarthy... had plans for an âM-expressionâ syntax... Probably the best example of a âLisp without parenthesesâ is Dylan."
- bryanlarsen mentions resources: "Many times. A google for "sweet expressions lisp" will give you a bunch of implementations and opinions."