zzril / aula

Audio programming language and interpreter
MIT License
0 stars 0 forks source link

Improve in-code documentation #4

Open zzril opened 4 days ago

zzril commented 4 days ago

Currently, there is a complete lack of comments in the code base.

At the very least, all "public" functions (i.e. the ones exposed via a header file) should have a comment explaining what the function does, what parameters it gets, how the return value is to be interpreted, and everything else the caller needs to know about. (E.g. for a function taking a heap-allocated buffer as an argument, does the responsibility of who is to free this buffer change?)
Struct members that are meant to be accessed by other compilation units should also have a comment explaining their purpose.

All of these comments generally belong in the header file.