Re:The Excellent Schemer
by galaxyLogic on Monday August 22, 2022 @05:26PM
(#32557488)
> Speaking of indentation, you have it wrong ..
That just tells me I got the indentation wrong because it did not clearly indicate the syntactic components of the expression.
> Someone who has been working with the language for a while just "sees" this: ...
I take your word for that. I have been working with Lisp for years but not recently, and I had trouble figuring out the meaning of the example code. I even got it wrong you say. It's clear for Lisp experts I'm sure but not everybody is a Lisp expert.
Pardon me; I see the indentation is wrong in the original article by Bob Calco.
I rely on indentation; if the indentation is bungled, there is a good chance I will misunderstand the code. I'm not going to count parentheses to see that something was falsely de-indented to look like it doesn't belong to the preceding block.
In the predominant style, nobody worries about which specific closing parenthesis goes with which opening one. The indentation reveals the subordination structure, and the editor takes care of that.
Speaking of indentation, you have it wrong: the sqrt should be indented inside the let.
At the ^^^^ spot, all that matters is that we have four closing parentheses. They are all the same otherwise. Which specific one closes the let is not informative.There are too many parentheses to be focused on them; you have to learn mostly not to see them, except within a line of code where there is no indentation. Someone who has been working with the language for a while just "sees" this:
Or maybe even this: (The question of "why not make that the syntax" has been thoroughly explored; it exists out there in some forms, along with other proposals for alternative Lisp syntaxes. https://srfi.schemers.org/srfi-110/srfi-110.html )