Merge pull request #444 from arthurmaciel/master

Added style for low-level internal procs
This commit is contained in:
Justin Ethier 2021-02-02 21:08:49 -05:00 committed by GitHub
commit c00034e578
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -373,6 +373,25 @@ Use `:` to explicitly note the namespace from which a name comes. **Only** use w
foo:procedure
### Low-level and/or internal procedures (% or _)
Use `%` or `_` to prefix low-level and/or internal procedures.
%make-raw-structure
%adjust-settings
_py-eval
_curl-get-opts
Although not necessary, it is not rare to see low-level/internal procedures and high-level/exposed procedures sharing their name, except for the prefix symbol. Sometimes the high-level/exposed procedures work as wrappers around the low-level/internal ones.
```Scheme
%retrieve-data ;; low-level/internal
retrieve-data ;; high-level/exposed - a wrapper around %retrieve-data
_py-eval ;; deals with C pointers and Python stuff
py-eval ;; deals only with Scheme data types
```
# Comments
Write comments only where the code is incapable of explaining itself. This is not a recommendation to avoid comments, but rather an incentive to **prefer self-explanatory code over explanatory comments**.