4 ms·
Three things I don't like about Common Lisp. 1. It has CLOS but it doesn't really embrace it in standard library. You have list, vector, hash-table, each with
by joesb 12y ago
Three things I don't like about Common Lisp.
1. It has CLOS but it doesn't really embrace it in standard library. You have list, vector, hash-table, each with its own iterator function. You have lots of #with-xxx macro. All modern languages utilize the idea of common interface like #iterator or #dispoable. You can clearly see CLOS library and pre-CLOS library in CL. CL needs to eat its own dog food (CLOS) more.
2. It lacks basic practical API library, while another containing big complicate academic functions. Its #format function is probably Turing complete. It has function to format number in Roman numeral. But it doesn't have function to deal with datetime. No networking IO function. No Threading library.
3. Condition and Restart could take the idea from Dylan. Tying condition to available restarts, and making class hierarchy of them, is a better idea. This problem stems from CL not actually utilizing CLOS.
Also, PACKAGE should take the idea of LOCALE, allowing easier local package rename, and less symbol conflicts problem.
- Moyamo 12y agoI agree with all your points. One of my main gripes with Common Lisp is its complexity. When I started learning Lisp, I expected to find a beautiful and elegant language, one without a need for syntax. The way C is almost an elegant assembly. Maybe I should have tried Scheme instead. Common Lisp is anything but elegant. Instead of a regular syntax, you get all these "mini-languages", like the format syntax e.g. (format t "~{~a~^, ~}" '(1 2 3)) ; prints out ; 1, 2, 3 This works fine for list, but not for vectors, which is a problem, since I needed vectors often (for random access). The loop macro is also quite powerful and complicated. e.g. (loop :for i :from 1 :to 1000 :collect (* i i)) will create a list of square of 1 to 1000. The loop macro can become really convoluted, not at all simple. The fact that Common Lisp is a Lisp-2 makes treating functions as first-class as rather awkward. I could never remember when I needed to prepend a lambda with #'. This article may be of interest http://xahlee.info/comp/Common_Lisp_quotations.html http://xahlee.info/comp/Common_Lisp_quotations.html I found much of the elegance I was expecting in Haskell. But maybe Scheme is a better lisp.