Serdar Yegulalp
Senior Writer

C++ popularity, Lisp simplicity unite in Clasp compiler

news analysis
Sep 26, 20142 mins

The new implementation allows Lisp programmers to interoperate with C++ libraries and code

The power and simplicity of the Lisp family of languages and the ubiquity and utility of C++ don’t commonly work side by side. But a new implementation of Common Lisp is attempting to change that.

Clasp, the project of Temple University chemistry professor Christian Schafmeister, is a version of Common Lisp that “interoperates with C++ and uses LLVM for JIT (just-in-time) compilation to native code,” according to the GitHub page for the project.

In a blog post announcement for the first release of the project, Schafmeister notes that the goal with Clasp was to allow the power and expressiveness of Common Lisp to leverage the wide range of libraries made available through C++. “Common Lisp has many language features that have not yet made it into the C++ standard,” he notes, so a number of the language’s features involve the interoperation between C++ and Lisp.

Clasp can interface with the LLVM C++ library, Schafmeister claims, to allow automatic cleanup and refactoring of existing C++ code, as well as creating new compilers for LLVM in Clasp.

The LLVM compiler framework has been used to juice up a number of language implementations. Apple’s using it to power a new JavaScript compiler, for example; a new Python implementation called Pyston is being built with LLVM as well.

Over the last few years, there’s been broadening recognition of both Lisp and its influence on languages. The concept of lambdas/closures, for instance, has its roots in Lisp, and new languages have been taking Lisp’s concepts and updating them for present-day users — such as Clojure, a Lisp-like language built on the JVM.

Clojure hews closest to the Clasp vision. Built on top of the JVM, it provides programmers with access to the range of libraries available in Java, in much the same way Clasp is meant to interface with the world of C++ libraries.

Schafmeister warns that the first iteration of the language is quite primitive and untested. “The current Clasp compiler generates slow native code that is about 100x slower than highly tuned Common Lisp compilers like Steel Bank Common Lisp,” he notes, and approximately 10 percent of the full list of Common Lisp symbols are not yet implemented. Multithreading isn’t supported yet either, and Clasp doesn’t build on Windows yet, only Linux and Mac OS X 10.9.

Serdar Yegulalp

Serdar Yegulalp is a senior writer at InfoWorld. A veteran technology journalist, Serdar has been writing about computers, operating systems, databases, programming, and other information technology topics for 30 years. Before joining InfoWorld in 2013, Serdar wrote for Windows Magazine, InformationWeek, Byte, and a slew of other publications. At InfoWorld, Serdar has covered software development, devops, containerization, machine learning, and artificial intelligence, winning several B2B journalism awards including a 2024 Neal Award and a 2025 Azbee Award for best instructional content and best how-to article, respectively. He currently focuses on software development tools and technologies and major programming languages including Python, Rust, Go, Zig, and Wasm. Tune into his weekly Dev with Serdar videos for programming tips and techniques and close looks at programming libraries and tools.

More from this author