From: Ezekiel Newren Date: Sun, 21 Sep 2025 16:03:06 GMT Subject: Re: [PATCH v3 05/10] xdiff: delete struct diffdata_t Message-ID: In-Reply-To: <7979d8f5-1e97-4429-891a-678adb3ba54f@gmail.com> On Sun, Sep 21, 2025 at 7:06 AM Phillip Wood wrote: > > Every field in this struct is an alias for a certain field in xdfile_t. > > > > diffdata_t.nrec -> xdfile_t.nreff > > diffdata_t.ha -> xdfile_t.ha > > diffdata_t.rindex -> xdfile_t.rindex > > diffdata_t.rchg -> xdfile_t.rchg > > That explains some of the changes here (so long as one assumes the > aliasing is a bad thing) but it does not explain why it is a good idea > to remove the local variables rchg[12] and rindex[12] and instead > dereference xdf[12] inside the loops I removed the struct and local variable aliases to make it easier for usage-tracking tools to follow where fields are actually used. Whether someone relies on grep, ctags/etags, or more modern tooling, aliases hide the true field accesses and make it harder to track or refactor those fields consistently. By using the fields directly, every reference is literal and unambiguous. Also the local variable names don't add any meaning and only barely shorten the lines where they are used.