3 ms·
Like the mainstream political arena, the most accurate explanations don't stick, but the most appealing ones do. The parentheses of Lisp's "function within the
by mindslight 7y ago
Like the mainstream political arena, the most accurate explanations don't stick, but the most appealing ones do. The parentheses of Lisp's "function within the tuple" application disappear in the same way that other languages' function-before-the-tuple parenthesis disappear - it's not particularly noteworthy. "Don't even see the parenthesis" is talking past the real objection, which is that the depth of parenthesis in every other language does not matter - ie (expr) is equivalent to ((expr)). Whereas in Lisp they also mean another level of application.
I think an interesting synthesis is Haskell, where function calls are simply juxtaposition. Parenthesis are just grouping like most languages, but it ends up feeling quite Lispy.
- kazinator 7y ago> the depth of parenthesis in every other language does not matter - ie (expr) is equivalent to ((expr)). You might want to rethink that hurried statement just a tad: // C for ((i = 0; i < MAX; i++)) {...} printf(("hello, %", name)); #if defined ((__GNUC__)) # Shell var=$((cat /etc/motd)) # Pascal type color_type = ((Red, Green, Blue));
- mindslight 7y agoSure, my phrasing was overly simplistic, applying in spirit to the way languages define general recursive expressions. But if you want to be technical, most of your examples would not be considered expressions in the given language. int j = i = 0; i < MAX; i++; /* ? I think not. */ But sure, many languages also use parenthesis for things besides general expressions. Ultimately this argument is anti-productive nitpicking.
- kazinator 7y ago> most of your examples would not be considered expressions in the given language. So that's a piece of cognitive load that you have to carry to know when the parentheses are on an expression, and do not change the meaning if compounded, versus when they are around something else where they may not be removed or compounded. In Lisp, everything is an expression, and no there is no willy-nilly removal of nesting or compounding of nesting. That's less to remember. Even fragments of forms are expressions, according to ANSI CL glossary terminology. If we have (let ((a b)) ...) then a, b, (a b), ((a b)) and let are all expressions. With the exception of b, what they are not is forms: expressions presented for evaluation. > Ultimately this argument is anti-productive nitpicking. Who started it?
- mindslight 7y ago> Who started it? WTH? You, by nitpicking a general statement meant to connect two perspectives and maybe allow some synthesis between two starkly divided worlds. I've had the Lisp kool-aid. I agree it makes for a great time. I can do without the proselytizing blast.
- argv_empty 7y agoPerhaps you know more of kazinator's history than I do, but that HN account wasn't even created until 2014, so saying kazinator is the one who started this very old argument requires some extra evidence.
- mindslight 7y agoI was referring to kazinator's specific argument rooted in languages using parenthesis for things besides expression grouping. I didn't see how that language-lawyering affected my overall point. FWIW "in Lisp [parenthesis] also mean another level of application" is also technically incorrect (nesting is not always application), but I think it gets the actual point across better than being more abstract.