Urgent.News

What's breaking now, across thousands of outlets.

Tech

Why Common Lisp is now the best programming language

Article URL: https://www.vivienhenz.com/common-lisp Comments URL: https://news.ycombinator.com/item?id=49973598 Points: 186 # Comments: 232

When considering the best programming language, Common Lisp emerges as a standout choice. This is particularly true in an era where large language models (LLMs) can generate code swiftly, making it essential to focus on how long your feedback loop takes. The speed at which you can iterate and refine your program becomes the decisive factor. In Common Lisp, this loop is notably short due to its unique features.

Unlike many other languages, Common Lisp has no clear distinction between read-time, compile-time, and runtime. This image-based approach, where the program exists as a live entity in memory, allows for immediate replacement of functions without restarting the entire program. Furthermore, errors in Common Lisp lead to a debugger opening with the full stack and variables, rather than crashing the entire program. This makes it exceptionally easy for an LLM to debug and refine the code.

The syntax of Common Lisp is based on lists, which also serve as the language's primary data structure. This means that all data manipulation tools can also be applied to manipulate code. This intrinsic link between data and code enables the creation of macros, functions capable of generating new code. Macros allow programmers to extend the language itself, building up domain-specific languages tailored to solve specific problems.

This flexibility is increasingly valuable as software increasingly becomes user-modifiable, a trend driven by LLMs that make such customization straightforward.

Moreover, Common Lisp programs tend to be more concise. Macros enable the abstraction of recurring patterns into language primitives, reducing the overall codebase. This conciseness not only makes the code easier to read and maintain but also reduces the cost associated with large-scale projects, as fewer tokens are required for LLMs to process the code.

The reduced token usage also benefits LLMs by ensuring a larger context window, where the entire program is available for analysis. This comprehensive understanding of the codebase enhances the LLM's decision-making capabilities and reduces the chances of it making changes without considering the broader context.

While Common Lisp has been around since 1994 without significant updates, this stability is a feature rather than a drawback. For software products that allow user modifications, this stability ensures that extensions built on top of the language will remain consistent and functional. Additionally, despite the relatively smaller ecosystem of libraries compared to more mainstream languages like Python, Common Lisp's emphasis on minimal dependencies mitigates security risks.

With LLMs capable of creating or adapting libraries as needed, the shortage of pre-existing packages is less of an issue.

Finally, the scarcity of Common Lisp programmers can be an advantage when building a business. The ability to attract top technical talent who are adept at quickly learning new languages can be a significant competitive edge. By requiring knowledge of Common Lisp during the hiring process, companies can ensure they are working with developers who are committed to continuous learning and growth.

In summary, Common Lisp's unique combination of live code, macro capabilities, conciseness, stability, and reduced dependency on external libraries makes it an ideal choice for modern programming needs, especially in an environment increasingly shaped by LLMs.

Written by urgent.news from Hacker News Best's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Every outlet that reported this, and when →

Read the original at vivienhenz.com →

More in Tech

More from Tuesday 6 October →