3 ms·
Yeah, that's a great example of the power of Lisp! Of course it now also leads to one of Lisp's other problems; namely that after a while everyone ends up prog
by adwf 11y ago
Yeah, that's a great example of the power of Lisp!
Of course it now also leads to one of Lisp's other problems; namely that after a while everyone ends up programming in their own private language of accumulated hacks :D
- lispm 11y agoThe user needs to learn more than in Java: 1) Learn to deal with a language which has an infinite number of syntactic abstractions. 2) Learn the typical patterns of syntactic abstractions (WITH- , BIND-, DEF- ...). 3) Learn how to write your own abstractions. Then groups will settle on common (!) Lisp patterns. See for example: https://common-lisp.net/project/alexandria/ https://common-lisp.net/project/alexandria/ There are lots of libraries which provide language extensions, which are used by many people. The extremes in Lisp are then: * no syntactic abstractions -> the power of Lisp wasted * using those syntactic abstractions which are approved by user groups, due to inclusion into libraries Above choices are relatively conservative. As another extreme, it is fully possible to change the language - but then Common Lisp provides more than macros to do so. See for example reader macros, CLOS MOP, customs evaluators/compilers, code walkers, ...
- adwf 11y agoYeah, I use Alexandria by default in every project now. I remember when I first started coding in Lisp, I wrote a ton of obvious functions/macros like the missing hash table traversals that are in Alexandria but are rather bizarrely missing from the Common Lisp spec. Then I found Alexandria and realised I'd written a good fraction of those functions myself! This was pre-quicklisp, so library discoverability wasn't great. Now I'm trying to make a concerted effort to follow the recommendations here: http://eudoxia.me/article/common-lisp-sotu-2015/ http://eudoxia.me/article/common-lisp-sotu-2015/ Hopefully this will lead to a modern set of consolidated libraries. Effectively a new Common Lisp standard: CL-20xx
- lispm 11y agoCommon Lisp already provides various hash-table traversals with LOOP: http://www.lispworks.com/documentation/HyperSpec/Body/06_abaf.htm http://www.lispworks.com/documentation/HyperSpec/Body/06_aba...
- adwf 11y agoThat's a good point. I always tend to forget about loop because I don't use it all that much, prefer using the Iterate library. Loop is a whole extra language all on its own.