Hacker News new | past | comments | ask | show | jobs | submit login

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




The 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/

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


Yeah, 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/

Hopefully this will lead to a modern set of consolidated libraries. Effectively a new Common Lisp standard: CL-20xx


Common Lisp already provides various hash-table traversals with LOOP: http://www.lispworks.com/documentation/HyperSpec/Body/06_aba...


That'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.




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

Search: