I wrote something like that some time ago to assist in another project of mine. Some internal macros started to have too many arguments and I was changing their order too often, so keeping track of the argument numbers was becoming a nuisance (and often lead to errors).
To solve that, I wrote the namedef package, that allows you to change from (an admittedly boring example):
\def\Say#1 to #2%
{#1, #2!}
to
\named\def\Say#[greeting] to #[whom]%
{#[greeting], #[whom]!}
The advantage I saw in this syntax is that if you decide to swap the order of #[greeting] and #[whom] in the parameter text, you don't have to change them in the replacement text—the advantage of semantics over syntax :-)
The code works by scanning the definition for #6[⟨name⟩], replacing them by numbers, and then handing the translated tokens for TeX to perform the definition.
The code is hosted at https://github.com/PhelypeOleinik/namedef. To build the .sty file, run tex namedef.ins, and to build the documentation, run pdflatex namedef.ins. The generated .sty file can be used in LaTeX with \usepackage{namedef}, or in other formats with \input namedef.sty.
\def\foo[#1]#2{#1 ... #2 ...} %where #1=parameters, %2=contentseems to be enough clear. – Przemysław Scherwentke Jun 14 '20 at 20:01pdflatex namedef.ins, and a.styfile should be generated. – Phelype Oleinik Jun 14 '20 at 23:36l3kernel, which is now loaded in the LaTeX kernel anyway, so virtually no dependencies. Maybe I should upload it to CTAN... – Phelype Oleinik Jun 15 '20 at 00:38