Re:Pixie: A sweet Clojure-ish language
by bbradley406 on Monday March 09, 2015 @08:35AM
(#9170526)
This trick is very helpful, but I would argue that there are still a lot more parentheses due to almost everything being written as a function in lisp. When I started programming in Racket arithmetic and comparison expressions tripped me up frequently. My tip to beginners in this area would be to use the dot-notation first, then switch to the standard way once comfortable.
for example:
(20 . > . (10 . / . 5))
may be more clear than (> 20 (/ 10 5))
Lisp languages in fact have the same(ish) amount of parentheses as any other language, the trick is that the placement slightly differ: the opening parentheses come before the function name, rather than after it. Ie foo(bar) => (foo bar) . foo(bar(baz)) => (foo (bar baz)).