Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Programming system is "fun" when you do not have to read stupid manuals ever and error reporting system tells you what you should do. I do not remember ever reading anything about python.

Clojure is the most unfun lisp indeed, unless you know java.

    Clojure 1.9.0                                                               
    user=> (+ 'a 1)                                                             
    ClassCastException class clojure.lang.Symbol cannot be cast to              
    class java.lang.Number (clojure.lang.Symbol is in unnamed module            
    of loader 'app'; java.lang.Number is in module java.base of                 
    loader 'bootstrap')  clojure.lang.Numbers.add (Numbers.java:128)


I am impressed that you were born with the knowledge of Python embedded in your brain.


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


in 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.


CL 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


Python is most advanced:

    >>> [if dark then moon else sun]
      File "<stdin>", line 1
        [if dark then moon else sun]
          ^
     SyntaxError: invalid syntax




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: