When I'm writing libraries based on an RFC, I usually try to retain as much as possible of the structure and data types of the document. Usually this manifests by incorporating as much relevant documentation as possible from the RFC as comments for various data types, methods, functions, etc. Also this is accompanied by links to the original doc.
However I have rarely seen this type of pseudo-literate code in the wild.
Is this something that you think it would help you as a developer, or do you find it a strange idiom?
As an example I can give my #ActivityPub library for #golang: https://pkg.go.dev/github.com/go-ap/processing#AcceptActivity
@mariusor I find this very helpful, and I often try to do it myself.