4 ms·
There is no need to remove them. They are disturbing only people who don't program with Lisp a lot. It's possible to make Emacs to almost hide the parentheses u
by nabla9 7y ago
There is no need to remove them. They are disturbing only people who don't program with Lisp a lot. It's possible to make Emacs to almost hide the parentheses using very low contrasts for "(" and ")" but even that is mostly useless once you are used to them.
I parse Lisp similar ways and speed as Python. The indentation in Lisp code is works the the same way.
Q: How can you tell when you've reached Lisp Enlightenment?
A: The parentheses disappear.
–– Anonymous
- singularity2001 7y agoThey are disturbing only people who don't program with Lisp a lot. Which is about 99.9% of the population. It's good for Lispers that they can ignore braces, but why ignore them when you can just drop them (in many cases), and thereby increase it's chance of mass adaptation. BTW, this post was an outcrop of another article "Why Lisp Failed (2010)" https://news.ycombinator.com/item?id=20374782 https://news.ycombinator.com/item?id=20374782
- breck 7y ago> Which is about 99.9% of the population. Agreed! For decades some people have said parens in S-Expressions are useless. But a key thing we're pushing, that's never been pushed before, is that the parens are worse than useless--they are harmful! They prevent easier program concatenation and ad hoc parser writing. And they make program synthesis, visual programming, and code analysis ~10x harder, for next to no gain. I'm hoping we'll start to turn the tide and bring the 99.9% of the population into the Tree Notation world, and those LISPers that love their parens can remain happily in their (world).
- dreamcompiler 7y ago> But a key thing we're pushing, that's never been pushed before, is that the parens are worse than useless--they are harmful! They prevent easier program concatenation and ad hoc parser writing. And they make program synthesis, visual programming, and code analysis ~10x harder, for next to no gain. Almost everything you've said above is not just untrue, but the opposite of the truth. As such, your statements require supporting evidence. Please cite some. And who, by the way, is "we"?
- breck 7y agoThere is a lot of evidence in the GitHub. See JTree library and the ohayo data vis tool. There is also a big open source release coming soon—the largest database of programming languages and features in the world by a factor of at least 10x, more like 100x. Over 10k languages, over 1k columns. We is the Tree Notation Lab. Will be announcing what that is and the funding for it later this month.
- geezerjay 7y ago> They prevent easier program concatenation and ad hoc parser writing. This assertion is patently false. Parens make it quite trivial to parse and render the underlying tree structuee rather obvious. Concatenating programs is just a matter of splicing a subtree into the target tree.
- breck 7y ago> This assertion is patently false. Here's a proof. - In S-Expressions with parens, there are infinite ways to write any given abstract syntax tree. - In Tree Notation, there is only 1 way to write any given abstract syntax tree. If you change one letter, you get a different tree. - Say I wrote programs in a Tree Language with a root node called "dumpToConsole" and I want to rename all such nodes to "print". I can write a type-safe ad hoc parser that does a simple search replace "/\ndumpToConsole/print/", using Tree Notation. If it were in S-Expressions, I'd have to use a full parser.
- nabla9 7y agoThere is Ruby and it's popular. Apple did it with Dylan in 1992, it didn't become popular. There is no need to change Lisp into different language because they already exist. Trying to get people who don't want to learn Lisp to learn Lisp is pointless.
- wrycoder 7y ago"The parentheses disappear." Exactly so. But, you have to use a proper editor with automatic indent, paren matching, and the ability to navigate by s-expressions. Composing lisp with something like Notepad is just a waste of time and an exercise in frustration. It is the unambiguous notation enabled by the parentheses that allow lisp to process code as data and construct programs on the fly. IMHO, those who suggest eliminating the parentheses don't yet understand lisp. Trying to make lisp more widely acceptable by eliminating them is throwing the baby out with the bathwater.
- singularity2001 7y agoIMHO, those who suggest eliminating the parentheses don't yet understand lisp. What's wrong with the three equivalence transformations of OP? It's the same language, only that newline/indent serve as hidden parentheses. f(a b) == (f a b) {a f b} == (f a b) f a b ≛ (f (a b))
- didibus 7y agoIt seems a lot more complicated. You have to parse the type of bracket used, you have to move your eyes across lines to understand nesting. I don't know. I find the Lisp way on the right side way more readable, but I'm an active Clojure developer so maybe there's that.
- geocar 7y ago> What's wrong with the three equivalence transformations of OP? Objectively: 1. I can't look at a line and tell if I have a complete expression. I must look at the following line and compare its indention level to this line. I may also need to look at the previous line(s) to see if we've switched to infix unexpectedly. 2. Indention means your programs will be bigger in physical area (meaning more scrolling). Pragmatically: 3. People are unable to reliably copy/paste indention-languages into many web forums (like HN and Reddit) making it harder for them to get the help they need when starting out. 4. It's slower and more complex to parse, making build/compile times slower. Subjectively: It just looks worse.
- darkpuma 7y ago