HeadlinesBriefing HeadlinesBriefing.com

Jank: Native Clojure Dialect with Seamless C++ Interop

Hacker News •
×

Jank is a native Clojure dialect built on C++ that offers unprecedented seamless interop. Unlike other languages, Jank handles C++ templates, virtual functions, exceptions, overload resolution, and RAII without boilerplate — developers simply include headers and start coding.

Powered by a Clang-based C++ JIT compiler, Jank provides interactive REPL-driven development. The example demonstrates calling Boost.Filesystem directly from Clojure syntax, with automatic type casting and exception handling that maps naturally to Clojure's try/catch.

Jank uses Leiningen-based project management with a Cargo-inspired native build system. Adding C/C++ dependencies requires just a one-line change. The tooling supports profiles for debug (optimization level 0) and release (level 3) builds.

For game development, Jank brings functional immutable data and REPL-driven workflows while allowing direct C++ access for performance-critical paths. The ImGui/GLFW example shows zero-marshalling interop — no bridges, registration, or callbacks needed. Jank compiles to C++, uses the C++ type system, and can link any C or C++ library.

Source: Hacker News · Summarized by HeadlinesBriefing