3 ms·
> Being "concise" is not one I've seen argued Really? Lisp is the most concise and clear language I've ever used. There is almost zero boilerplate when writing
by hacker_9 9y ago
> Being "concise" is not one I've seen argued
Really? Lisp is the most concise and clear language I've ever used. There is almost zero boilerplate when writing it.
The example was a simple one to get the idea across, you can create your own functions and do the same too:
(my-let [a 1
b 2
c 3])
my-let could be a macro that compiles to a normal 'let', while also recording all variable names for some other use, or adding logging, or whatever you want. Another concise example is the -> macro to pass the result of a function in as the first arg of the next function:
(-> a b c d e f)
instead of
(f(e(d(c(b(a))))))
These can all be argued against I'm sure as they are still simple. Check out some example code written in Clojure for a better view of conciseness [1]
[1] https://github.com/oakes/play-clj-examples/blob/master/breakout/desktop/src-common/breakout/core.clj https://github.com/oakes/play-clj-examples/blob/master/break...