Remix.run Logo
▲ WalterBright an hour ago

> Lisp programs are often much more concise because macros let you abstract away recurring patterns and make them part of the language itself

This is why Lisp never catches on. Each programmer invents their own ad-hoc, undocumented, barely working language in the form of those macros. The same thing happens in other languages with macros (like C and assembler).

▲Jach 29 minutes ago | parent | next [-]

Empirically this is not true and the article overstates its claim by using "often", unless we take it to mean the tens of included macros that come with the language and aren't ad-hoc, undocumented, or barely working. (Or reinvented, coming with the language.) (Like the ones for defining functions, or classes, or structs, or looping, or multi-branch conditionals...) Take a random sampling of Lisp projects and libraries and you'll see the vast majority are using plain standard Common Lisp and lack a bespoke DSL. Some are more object-oriented, some are more imperative, some are more functional, they look pretty normal within each paradigm. The ability to easily create DSLs is indeed a nifty feature that can lead to the benefits described (https://www.stylewarning.com/posts/nbody/ is a post I've been fond of linking this year), along with the downsides, but that hardly represents most Lisp code. The feature wouldn't make a top-5 for reasons Lisp "never catches on", whatever that means. (Like the sibling I'm wondering if C is included in that assessment, or from another direction, Clojure.)

▲ludston 16 minutes ago | parent | prev | next [-]

Nah it never catches on because of a combination of momentum, esoterica, being more difficult to learn due to having more discrete functions in the stl. And then there is the fact that it's pretty dated, so lots of people come to CL, get mad about it's warts and then become compiler writers.

I say this as somebody that loves CL dearly. The difference between princ, prin1 and print; set, setf and setq; =, eq, eql, equal and equalp is more than most programmers can be bothered to memorize.

▲stackghost an hour ago | parent | prev [-]

>This is why Lisp never catches on.

>[…]The same thing happens in other languages with macros (like C and assembler).

Uh, C definitely caught on.

▲colordrops 39 minutes ago | parent [-]

Different though. Macros in lisp are built with basic language features. They are a core language feature in fact. Macros in C are not.