by pmoriarty · 4y ago · 0 comments
But if you're already familiar with any of those, it'll be the same as what you're used too.
It's been a while since I last used Clojure, so I don't know if the situation has improved in the meantime.
(defn foo [a b]
(def a a)
(def b b)
(/ a b))
If the function fails, I have captured its input parameters right before the exception occurred and now I can inspect it from the REPL if 'b' is 0. From the REPL I can change the value of 'b' with simple `(def b 42)` or change the very definition of 'foo' and re-evaluate it again on the REPL with simple `(foo a b)`.I even made myself an elisp function for inserting the '(def a a)' into the code https://github.com/Bost/corona_cases/blob/master/.dir-locals... (enjoy).
informal coffee break answer: abstracted layers of abstracted abstraction within parametrized abstractions just don't feel right to lispers.
My browser is cpp program. Say, 10 layers are typical. Then, there's a libc + ui linux code. Usually in c, so even less layers. Say, 10 more. Then, there are sycalls annoying the kernel from time to time. Pretty shallow, btw, 5.
That's 30 roughly speaking. Maybe 40.
Java + clojure combo is not impressed, not at all.