From: Junio C Hamano Date: Mon, 04 Apr 2022 21:44:27 GMT Subject: Re: [GSoC][PATCH v3] Add a diff driver for JavaScript languages. Message-ID: In-Reply-To: <660d068f-1c8c-7057-0a92-5100791daf80@kdbg.org> Johannes Sixt writes: > Am 04.04.22 um 09:12 schrieb Ævar Arnfjörð Bjarmason: >> While we don't use helper macros for these currently there's no reason >> we can't, I thin the above might be more readable with e.g.: >> >> #define JS_AA "[$_[:alpha:]][$_[:alnum:]]" > > Please consider including "identifier" somehow in the macro name. And > add the trailing '*', which... > > ... which makes me wonder why it is not present here. If that's an > oversight: nice catch! Yeah, and taken together with the locale worry, we shouldn't play cute and use :alpha: and :alnum:, but spell them out, i.e. #define JS_IDENT "[$_a-zA-Z][$_a-zA-Z0-9]" probably.