4 ms·
Since you've taken the worst possible interpretation of his comment: He's saying that clojure errors are not user-friendly and give you little idea how to imple
by mod 6y ago
Since you've taken the worst possible interpretation of his comment: He's saying that clojure errors are not user-friendly and give you little idea how to implement a fix.
I agree with him, and I have spent a lot of time scratching my head debugging clojure.
Python gives a better idea of what's wrong, where it's wrong, and what a fix might be.
Here's roughly his example, but in python:
>>> "a" + 2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: cannot concatenate 'str' and 'int' objects
- lispm 6y agoin the Lisp I'm using I get this: CL-USER 24 > (+ "a" 1) Error: In + of ("a" 1) arguments should be of type NUMBER. 1 (continue) Return a value to use. 2 Supply a new first argument. 3 (abort) Return to top loop level 0. Type :b for backtrace or :c <option number> to proceed. Type :bug-form "<subject>" for a bug report template or :? for other options. CL-USER 25 : 1 > There is a clear error message and direct ways to fix/report the problem. Including another REPL to investigate the error.
- timonoko 6y agoCL Loop-macro error reporting is legendary: [1]> (loop until sun dies and moon explodes) *** - LOOP: illegal syntax near DIES in (LOOP UNTIL SUN DIES AND MOON EXPLODES) The following restarts are available: ABORT :R1 Abort main loop
- lispm 6y agoPython is most advanced: >>> [if dark then moon else sun] File "<stdin>", line 1 [if dark then moon else sun] ^ SyntaxError: invalid syntax