Hacker News new | ask | show | jobs
by diggan 1877 days ago
> In lisp, you are learning a new language with every lib because each author think they are a god language designer and that their macro rock. Also they don't need a good doc cause they are obvious. Or good error message cause they never break.

You have any specific examples of Common Lisp libraries you found hard to understand? I had a hard time when first learning the language, but once I got proficient to write my own code, I found it easy to understand most libraries I ended up using myself, the same as any language really. That the REPL makes it so easy to explore them with your own context, helped a lot as well.

> Also the way the author dismiss the number gap of packages available is ignoring the elephant in the room.

In the very same section, the author describes why the number of package don't matter as much as you think it does. Curation VS free-for-all-publishing (like APT vs NPM). Add together that Common Lisp "the language" has been stable for decades, makes it much more possible to be able to use any of the libraries you find as well, where in the Python world, we both know this not to be true (just Python2 VS Python3 makes this a whole other world of messes).

1 comments

There are some famous examples[1], but to be honest, they are rare outliers for libraries published. And even for internal use, the amount of "local custom style" seems pretty minimal in my experience.

[1] Off the top of my head, I can recall Cells (early reactive/dataflow system - weirdness included symbol names made to sort first in Allegro CL IDE) and hu.dwim.* stuff which had its own wrapper around CL:DEFUN and CL:DEFMETHOD, iirc. But I successfully used their stuff without caring about that.

> There are some famous examples

As someone new to the ecosystem of Common Lisp and in general a bit sadist (ref https://www.youtube.com/watch?v=mZyvIHYn2zk), could you share which ones these are so I can enjoy not understanding them at all?

Edit: I see now after I made my comment you added examples, thanks :)

There's a long story of macros wrapping DEFUN/DEFGENERIC/DEFMETHOD/DEFCLASS. I'll admit I even used some for shortcuts in declaring types and constraints.

But their use isn't that widespread, and in practice you can pretty quickly get used to the rare case that needs you to understand them.

I think the most complex is stuff that requires code-walkers and involved things like macros for CPS transformers of code.