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

Are you sure you didn't just Google up the Lisp Curse and use it as an excuse to avoid engaging what was mostly idiomatic Clojure?

Rampant metaprogramming is not that common in Lisp codebases, and what of there is will tend to be pretty shallow, like bits of syntactic sugar here and there.

Do you have some example of the inscrutable metaprogramming?




I have a few examples of it.

One dev came up with their own macro that linked together the http client and json parsing into one magic macro which allowed them to also format the json, log it, and a bunch of other conveniences mostly for that dev. Unfortunately, the function was highly tailored to where it existed (with hard coded params and such). It's invocation ended up looking something like `(ht-j g foo 'log')` (because this dev also liked shortening everything).

Another example of this is some devs wanted to make a super generic data fetching... thingy... so they came up with this wild macro where you could feed in http urls and a custom configuration and it'd expose calls to that downstream services. It allowed for a sql like interface into several different microservices. Interesting in concept, impossible to maintain. That project was ultimately scrapped.

I was unaware of "the lisp curse" before my comment. This was just what my company experienced.


Something like (ht-j g foo 'log') could be a function. Someone could do that in Javascript like htj.(g, foo, 'log') or whatever, which is no more or less clear. You wouldn't have a code generation step to deal with, but you can expand macro calls in situations when the macro body isn't readable.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: