3 ms·
A function call has runtime overhead that a macro may not. There are also things that can be difficult to express as a function in the language type system but
by norir 3y ago
A function call has runtime overhead that a macro may not. There are also things that can be difficult to express as a function in the language type system but that are straightforward to implement as a macro. Lisp isn't the only language with a strong macro system but it disproportionately attracts programmers who value the power and expressivity that a strong macro system provides.
There are a number of reasons that bottom up programming in the style PG seems to be advocating for is not popular in industry. Industrial programming favors the median developer while bottom up is a technique that works best with small teams of skilled programmers. Big cos obviously prefer "safe" languages, but even startups are generally conservative due to the vc induced pressure towards hypergrowth, which also favors the median developer since hypergrowth requires hiring.
Writing good programs from the bottom up requires more skill[1], but can lead to substantially better programs by certain criteria. But it may also be considered inscrutable by the median developer. The median developer can also misuse the power afforded by the bottom up language and write something much worse than they would have been able to in a more conservative language. This isn't a knock on the median developer, btw, just my perspective on why this style is rarely found in industry.
[1] neither LLMs nor stack overflow are of much help when you have essentially written a new language to solve your problem.
- TerrifiedMouse 3y ago> There are a number of reasons that bottom up programming in the style PG seems to be advocating for is not popular in industry. I think another reason is that it’s just more work for another programmer to grok a bottom-up written program written with its own DSL then a program that’s bent to fit the existing (more rigid) language since they already know the existing language.