Skip to content

chore: reduce walls of comments#132

Merged
gmelodie merged 1 commit into
masterfrom
chore/reduce-comments
Jul 15, 2026
Merged

chore: reduce walls of comments#132
gmelodie merged 1 commit into
masterfrom
chore/reduce-comments

Conversation

@gmelodie

Copy link
Copy Markdown
Collaborator

Summary

The FFI layer had accumulated large comment walls — multi-paragraph module headers, multi-line # rationale blocks, and long per-proc/field docstrings — that mostly restated what the code already says. This trims them to the project's comment budget: no multi-line non-doc comments (a single # line, or self-explanatory code), and docstrings capped at 3 lines (usually 1). Load-bearing WHY notes (malloc/free-vs-ORC-TLS thread hazards, single-fire callback, ABI wire-format seams, deadlock/reentry rationale) are kept — compressed to one line each rather than deleted.

Net effect across 51 files: 575 insertions, 1816 deletions. The insertions are almost entirely multi-line blocks collapsed into single terse lines, so the actual comment-text reduction is well past the line ratio.

Affected Areas

ffi/ runtime (thread, event, request-queue, context, cbor, alloc), ffi/internal/ macros (ffi_macro, c_macro_helpers, ffi_library, ffi_scalar), ffi/codegen/ generators (rust, cpp, c, meta, cddl, types_ir, string_helpers), the unit/bench tests, and the echo/timer examples. Changes are limited to comments and docstrings — no code tokens, identifiers, or emitted-code string literals were touched.

Impact on Library Users

No impact — comment-only change. No API, behavior, or performance change.

Risk Assessment

Minimal. Every touched file passes nph --check unchanged. Diff inspection confirms each changed code line differs only by a removed/shortened trailing comment; the code is byte-identical. No functional lines were altered.

References

N/A

@gmelodie
gmelodie force-pushed the chore/reduce-comments branch from f5055b6 to d7ef455 Compare July 15, 2026 13:25
@gmelodie
gmelodie marked this pull request as ready for review July 15, 2026 13:26

@Ivansete-status Ivansete-status left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to confirm there are no weird acronyms being used.
Thanks!

Comment thread ffi/codegen/c.nim Outdated
@gmelodie
gmelodie force-pushed the chore/reduce-comments branch from d7ef455 to 1b0e4f8 Compare July 15, 2026 14:45
@gmelodie
gmelodie merged commit 9ed1fed into master Jul 15, 2026
3 checks passed
@gmelodie
gmelodie deleted the chore/reduce-comments branch July 15, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants