Skip to content

Comment on Clojure: Genetic Mona Lisa problem in 250 beautiful lines

Comments

As python is beautiful, lisp is parenthesis-y.

Has anyone thought about a Lisp dialect that uses white space, like Python, to get rid of the ()?

Why don't you make your editor to paint them white and indent them?

Make an editor which will randomly color-code each set of parentheses such that they or their background is in a set of colors which don't appear as other keywords (like function defs or strings or whatever) so as not to add confusion. You now have a way of more easily seeing every matching pair of parens without having to hover over each one. However, now you have to deal with a strange assortment of colors on your screen.

Oh wait, you can just use a gradient of colors instead of random ones, with the more-nested paren pairs having colors farther in on the gradient. Silly me.

"Oh wait, you can just use a gradient of colors instead of random ones, with the more-nested paren pairs having colors farther in on the gradient. Silly me."

Good idea! Is it doable in VIM now? :|

Some of us prefer the parens.

"Logo is a computer programming language used for functional programming. It is an easier-to-read adaptation and dialect of the Lisp language; some have called it Lisp without the parentheses."

http://en.wikipedia.org/wiki/Logo_programming_language

Parens let you have multiple expressions in one line, which indentation alone could not really express (except perhaps in a Haskell-like with currying, . and $ operators, etc).

For example, I don't see how (map (fn [x] (+ x 2)) (concat (take 5 my-series) etc...)) could be broken down with indentation alone without taking quite a few extra lines.

Dylan removes the parenthesis, but it doesn't go as far as using whitespace.

http://en.wikipedia.org/wiki/Dylan_programming_language

See I-expressions.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.