Re:jank is C++
by bertmuthalaly on Friday July 11, 2025 @06:54PM
(#44537608)
It's the first section in the article -
"I have implemented manual memory management via cpp/new and cpp/delete. This uses jank's GC allocator (currently bdwgc), rather than malloc, so using cpp/delete isn't generally needed. However, if cpp/delete is used then memory collection can be eager and more deterministic.
The implementation has full bdwgc support for destructors as well, so both manual deletion and automatic collection will trigger non-trivial destructors."
In the artical - it garbage collects always but if you call delete the garbage collector will be more agressive about cleaning that up.
A GC is nowhere near the most difficult part of this. In 2014, there was no viable technology for JIT compiling C++, and very little technology for JIT compiling native code in general.
Re:jank is C++
by ethan_smith on Saturday July 12, 2025 @11:46AM
(#44542872)
Jank likely uses a combination of LLVM's garbage collection support (GC intrinsics) and smart pointers, similar to how Clasp implemented GC for Common Lisp on C++.
1. does that objection make sense? 2. How does jank approach that hurdle.