If you are interested with Literate programming, you should try Emacs. Some packages are org-mode, eev and even elisp are best for literate programming. Example https://www.youtube.com/watch?v=dljNabciEGg
Emacs org babel is super handy and fun. Sometime ago, I took a peek at one of the supported languages to see if I could get Objective-C working. It was fairly straightforward. Since then, I added SwiftUI, LLMs, and Dall-E babel support.
Tangle: Extract the source code blocks and generate real working code files for further compilation or execution, eventually outside of Emacs.
Weave: Export the whole Org file as literate, human-readable documentation (generally in HTML or LaTeX)."