Email or username:

Password:

Forgot your password?
marius

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: pkg.go.dev/github.com/go-ap/pr

#opensource #developers #programming

3 comments
Mike P

@mariusor I find this very helpful, and I often try to do it myself.

bhaugen

@mariusor I don't code in Go, but I like the idiom and would use your library if I did.

Tobias Klausmann

@mariusor I like it when it is done properly, and I have done it myself on occasion: codeberg.org/klausman/pngrep/s

Go Up