Botan bindings devlog
Haskell Community [Unofficial]
February 9, 2026
This is a great write-up. I really appreciate how clearly you separate “incidental ugliness” from the parts that are genuinely forced by CApiFFI and type safety. The BotanRNGStruct / BotanRNG / RNG layering reads much less like over-engineering once you walk through the constraints.
The framing of mkBindings as an early, ad-hoc memory abstraction really resonates. Given that you now have Memory.Memory and Memory.Pointer, it feels like the natural evolution rather than a breaking redesign—using the right primitives once they exist.
I also like the point about polymorphism over return types being a feature gain, not just cleanup. That kind of payoff usually signals the refactor is doing real work.
Deleting mkBindings once it’s redundant sounds like a net win for maintainability. Very curious to see how cleanly this pattern carries over to the other Botan context objects.
Discussion in the ATmosphere