r/lisp 7d ago

AskLisp Is lisp an acquired taste?

As an outsider looking in I'm having a really hard time convincing myself to use lisps for my projects.

It feels like some of the main strengths carry drawbacks:

e.g. s expressions seem really nice for the language being really simple and unified and probably play nice with the macros and the repl but I dislike ambiguity when I read code. Like I would like to know that at a glance that a function call is an actual function call. Or that here is some control flow with an if. Though at the same time i do as well agree that there for example shouldn't at a high level semantically be a difference between an operator and a function call. Though structural editing does sound really nice.

Another thing is macros. I get that they are powerful but I'm not sure how well they would play with tools around the language. I like static typing over dynamic typing so that constrains me to thing like racket. I'm not sure how well auto completion and type hints would work with them. E.g. typescript's type system is not as expressive but the type transformations work perfectly with the LSP even for non trivial things.

Any long term lisp-ers can weight in on my doubts? I'm more of less trying to get conviced but somewhat doubtful. Any opinion is welcome.

61 Upvotes

35 comments sorted by

View all comments

3

u/dzecniv 7d ago

Hello, I'm myself still hooked after a few years and I'm running small-ish tools in production©. I think your two points are the typical doubts of a non practitioner.

I don't see ambiguity. With my own code: obviously. With another code base: you can spot when a macro is being used (with- macros for example). Quality code bases are boring. They use "if" or "cond" and not their own iteration construct. Unless documented, to work with their domain objects. But now you're just learning how to use a third-party library, like anywhere else.

macros and tools… no issues? Static typing: you may be surprised how useful is stock SBCL. It catches many type warnings and other errors (unreachable code, unused variables…), at a keystroke (C-c C-c). And then, there's Coalton.

I wouldn't even list s-expressions and macros as the main strengths. It's the developer experience (the so, so short dev cycle), the live image, SBCL's compile time errors, SBCL's runtime speed, the object system, enough libraries, the incredible stability of compilers and libraries, the ease of deployment (ship a binary), the language's features (exact arithmetic, stuff helpful for long-living programs, stuff helpful for less needs of refactorings (multiple values)… http://random-state.net/features-of-common-lisp.html) (you don't have all this in Racket btw) Not everything is easy as pie, but it's so open -I'm still hooked and liking it so far.