Re:The Nature of Lisp (2006)
by aaron-lebo on Wednesday May 20, 2015 @01:25PM
(#9577788)
I could have explained the syntax.
If you are familiar with Python, it more or less is equivalent to something like:
" ".join([1, 2, 3]).count().println()
Which, imo, reads much better than: (println (count (join " " [1 2 3])))
Of course, Clojure has the threading macro, but this language emphasizes it.Or, rather, maybe it will read better, about a generation after the first crop of high schoolers start being taught
f(x).sin().log()
instead of log(sin(f(x))).That should be
x.f().sin().log()
and that is exactly what they type on their calculators:[3] [1/x] [sin] [log]
(either that, or I am getting old. Modern graphing calculators may have different input modes)
Re:The Nature of Lisp (2006)
by aaron-lebo on Wednesday May 20, 2015 @03:47PM
(#9578776)
I get what you are saying, but when you are talking about programming languages as opposed to math or another domain, more people are familiar or comfortable with the former, hence the reason for numerous posts like the original having to explain why lisp's syntax is a good thing.
Posts explaining why Lisp's syntax is a good thing have to deal with moving the left parenthesis to include the function:
log(sin(f(x)))) -> (log (sin (f x)))
They don't have to evangelize function composition being indicated by nesting.Clojure is weakly typed? That python won't work since it is strongly typed.
Re:The Nature of Lisp (2006)
by aaron-lebo on Wednesday May 20, 2015 @03:44PM
(#9578743)
Key word being like. That syntax works in Ruby, Python, or JS with the right methods defined.
it's joining the vector 1,2,3 with a space to make "1 2 3 ", right? so what is that count doing there? I'm not saying that lists are the end all be all of syntax (clojure has vectors for a lot of things specifically to reduce the parens), but you need something there to make it clearer