hn.today

Jank – The native Clojure dialect with seamless C++ interop

jank-lang.org100 points10 comments
Screenshot of Jank – The native Clojure dialect with seamless C++ interop

Jank is a native Clojure dialect that runs on top of C++, providing truly seamless C++ interop so templates, virtual functions, exceptions, overload resolution, and RAII behave as in idiomatic C++. Developers can include headers directly and call C++ APIs from a REPL-driven workflow powered by a Clang/LLVM-based JIT, while retaining the Clojure language model and immutability. The language uses the C++ type system, can compile to C++, and supports ahead-of-time compilation to compact native binaries for fast startup.

Tooling mixes Leiningen-style project management with a Cargo-inspired UX for native dependencies: a native build system that discovers or builds C/C++ libraries, simple dependency declarations, and editor integration via nREPL. Examples show straightforward use of Boost.Filesystem and embedding of ImGui/GLFW for game development, emphasizing zero-cost interop - no wrappers, marshalling, or callback glue. The project highlights native JIT for iterative development, AOT for release binaries, and an ecosystem backed by sponsors, with links for installation and learning.

Read on jank-lang.org10 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

We have traits at home

We have traits at home

Zig uses two main approaches for polymorphism: runtime interfaces with dynamic dispatch and compile-time duck typing for static polymorphism. These methods offer different tradeoffs in performance and safety, with Zig emphasizing simplicity and compile-time checks over complex abstractions. (axelmagn.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.