Refactoring the D Koans with metaprogramming

💡 The problem Welcome back, it’s been quite a long time since my last ramblings on the D Programming Language! This post is born from a necessity. An old project of mine, the D Koans, was using an external library to simplify unit testing, which is more or less the core of the whole project. Unfortunately, the library started giving some deprecation warnings when compiled with recent D versions. Since the D Language already has an internal unit testing framework, I thought it would be nice to remove the single dependency and rely only on the standard library. Initially, with some global search/replace, I managed to convert all the tests to unittest blocks. ...

May 21, 2025 · Andrea Manzini