From: René Scharfe Date: Tue, 11 Aug 2020 16:08:22 GMT Subject: Re: [PATCH 0/11] renaming argv_array Message-ID: <82991f30-fe37-d6d2-ffd5-8b0878f46c83@web.de> In-Reply-To: <20200728202124.GA1021264@coredump.intra.peff.net> Am 28.07.20 um 22:21 schrieb Jeff King: > The argv_array data type has turned out to be useful in our code base, > but the name isn't very good. From patch 2 of this series: > > The name "argv-array" isn't very good, because it describes what the > data type can be used for (program argument arrays), not what it > actually is (a dynamically-growing string array that maintains a > NULL-terminator invariant). This leads to people being hesitant to use > it for other cases where it would actually be a good fit. The existing > name is also clunky to use. It's overly long, and the name often leads > to saying things like "argv.argv" (i.e., the field names overlap with > variable names, since they're describing the use, not the type). Let's > give it a more neutral name. > > This has bugged me for a while, so I decided to finally fix it. It > wasn't _too_ painful, though I'm sure there will be a little fallout > with topics in flight. Just as this landed in master now, https://lobste.rs/ decided to link to http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2493.pdf, which is a paper about reserved identifiers in C. It contains a nice overview. Anyway, 7.31 of C11 says: "All external names described below are reserved no matter what headers are included by the program." And 7.31.13 goes on: "Function names that begin with str, mem, or wcs and a lowercase letter may be added to the declarations in the header." So the names of the strvec functions are reserved. Also how about using Coccinelle and patience to reduce the impact of such a change next time? I.e. adding the new thing, providing a semantic patch for converting old code, waiting a reasonable amount of time after the last conversion was necessary and then removing the old thing. René