I really like the one-module-per-file model of JavaScript or Python.
If you're storing code in files, you might as well leverage file boundaries. If modules are a separate abstraction (e.g Rust, OCaml), it's harder to learn and choose how to organise code.
miniblog.
Related Posts
Difftastic understands syntactic boundaries. I keep spotting cases in other diff tools where textual diffing can't show the structure.
On the nuances of Rust inlining, crate boundaries, and what gets inlined by default: https://matklad.github.io/2021/07/09/inline-in-rust.html
I've been adding heuristics to difftastic for showing comment changes. See before and after.
It's a messy problem: do I split on spaces or word boundaries? Do I handle "reflowing" single-line comments where a word is added to a sentence and several comments change?





