8 ms·
"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-expressi
by 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 agoI don't think "notepad.exe is a shitty editor for this language" is a relevant objection in the first place. It's like criticizing python because notepad.exe lacks an auto-indent function.
- geezerjay 7y ago> Exactly so. But, you have to use a proper editor with automatic indent, paren matching, and the ability to navigate by s-expressions. Autoindent and paren matching is currently a basic feature of virtually all mainstream text editors. Therefore, picking up any random mainstream text editor is already enough to address your concerns.