3 ms·
I've been using Scheme as one of my languages for a decade. (Haskell, Python, Ruby, Bash are the main others.) I generally use a preprocessor for each language.
by Syzygies 8y ago
I've been using Scheme as one of my languages for a decade. (Haskell, Python, Ruby, Bash are the main others.) I generally use a preprocessor for each language. The Haskell preprocessor treats indented as code, flush as comments, also supported by my syntax highlighting. Comment characters feel to me like a thousand Hitchcock birds shat on my car. They're so easy to avoid. It also introduces here docs; no language should be so full of itself that it can't embed multiple lines of another language verbatim.
I've gone through several period of straight Lisp parens, and several periods of using a preprocessor. I believe in committing to muscle memory before deciding; I've oscillated back and forth between Querty and Dvorak, for example. I'm more committed to psychological experiments than anyone who claims the parentheses haters are newbies who haven't tried.
Study counting in higher mammals: One finds that "one, two, three, many" is core to all of us, and higher systems are strapped on like the multiple layers of vision mechanisms. Humans can't deal with the tiger tails at the end of lisp expressions. But machines can? Yes, but machines can also handle inferred parentheses. The complainers about parentheses complainers want off-the-shelf support. Real programmers write their own support.
Lisp looks best with indentation to help infer parentheses. Use a pipe "|" to open a parenthesis that auto-closes at the next ")" or the end of the line. Use a dollar "$" (borrowed from Haskell) to open a parenthesis that auto-closes when the indentation returns. Lisp written this way is stunningly beautiful poetry, cleaner than any of the dozens of languages I've programmed in. The remaining parentheses actually matter, so one pays attention to them.
I've spent years each way, back and forth. Inferring parentheses is better, and one can write any tool to follow this syntax.
- GorgeRonde 8y agoWould you mind sharing some example code on Gist, please ?
- jiyinyiyong 8y agoYou would be interested in my old project using `$` as a way for reducing parentheses: http://text.cirru.org/ http://text.cirru.org/ .