Live data from Hacker News

Lisp without parentheses: Lisp INdented

genyris.com

41–45 of 45 posts

Re: Lisp without parentheses: Lisp INdented

#41
post #40

Am i the only one who likes lisp because of the parenthesis and the lack of syntax? The parens are the perfect way of representing the syntax trees, and you dont have to be bothered with remembering all the syntax and operators etc like with the other languages.

No, definitely not. I agree with you 100%. The claim that somehow this retains all qualities of Lisp is absolutely ridiculous. The single most important property of Lisp is that programs are lists, i.e., code==data. "Indented" lisp breaks this. I'm not intending to troll when I say that people who don't like the parens just don't "get it."

Not necessary that "indented" lisp breaks code==data property. Just like YAML can represent an arbitrary tree structure, indented syntax can be mapped to S-expr and vice versa.

I suspect the reason that alternative syntax for Lisp doesn't fly is that, once you use Lisp enough, you start feeling too comfortable with S-expr and the editor's support on it to switch to alternative syntax. It only appeals to those who are new to the language. And the downside is that the editor support can't be as good as S-expr (I suppose; is python-mode capable of various C-M-something tricks?).

Re: Lisp without parentheses: Lisp INdented

#42

Am i the only one who likes lisp because of the parenthesis and the lack of syntax? The parens are the perfect way of representing the syntax trees, and you dont have to be bothered with remembering all the syntax and operators etc like with the other languages.

> the perfect way of representing the syntax trees Humans don't think in syntax trees.

I do. When I think of algorithms I vaguely imagine DAG, which maps nicely to S-expr (the junction point maps to a tail function call).

In languages with syntax, I have to add syntactic fluff to satisfy the compiler, which is mostly an extra annoyance.

I don't say my way of thinking is the correct one. Some great programmers I respect have said they don't think in DAG (and naturally they choose languages other than Lisp as a primary tool).

Re: Lisp without parentheses: Lisp INdented

#43

Am i the only one who likes lisp because of the parenthesis and the lack of syntax? The parens are the perfect way of representing the syntax trees, and you dont have to be bothered with remembering all the syntax and operators etc like with the other languages.

Nope, you're not :)

Re: Lisp without parentheses: Lisp INdented

#44

Earlier quoted context omitted.

I've done this with Ruby and set the color to light gray. My co-workers wanted to have C/Java-style parens around damn near everything (except when they didn't; the reasoning to omit them was something along the lines of, "But, see, here it's a DSL." ) They strike me as line noise and make it harder to read many things, so I lightened up the color in my vim syntax files to give the appearance of more white space. I h…

Heated debates amongst programmers (coworkers) about marginally important questions such as indenting styles, parenthesis usage, naming conventions, source code directory structure, etc. are always very amusing to observe. I usually sit back and just watch the show.

"I usually sit back and just watch the show."

Were that always an option. :)

Re: Lisp without parentheses: Lisp INdented

#45
post #20

Earlier quoted context omitted.

is there a way to interchange ( to [ ? I have RSI. P.S. Not keyboard mapping please.

(defun square-bracket-reader (stream char) (declare (ignore char)) (read-delimited-list #\] stream t)) (defun use-square-bracket-readtable () (set-macro-character #\[ #'square-bracket-reader) (set-macro-character #\] (get-macro-character #\) nil)))

thanks!
Post reply on HN