Michael Heerdegen [2023-01-13 14:47:52] wrote: > Stefan Monnier writes: >> The patch below uses this "new new" syntax (and adjusts `cl-flet` to >> also support this new new syntax). It still lacks a NEWS entry (as >> well as updating the CL manual), but before I do that, I'd like to hear >> what other people think, > > I like the idea to implement this kind of feature for `cl-labels'. It's > a good change IMO. > > I don't like the syntax I think (ugly). The rest of this answer is > discussing this detail: > > I don't recall all details about the ambiguity of the empty body case, > so forgive me if I'm missing something. > > A binding like (my-fun (var1 var2)) with an empty body would give you > compiler warnings anyway. Would this be an alternative to your "=" > style syntax: > > To specify a local function with an empty body one would have to use > local variable names starting with "_": > > (my-fun (_var1 _var2)) > > If not all variables start with an underscore or not all list members > are symbols, the binding is interpreted as specifying an expression > evaluating to the function to bind. This assumes that "_var" never > specifies a named function. I guess you're right. So we should just use the (FUNC EXP) syntax, exactly like we already do for `cl-flet`. The patch below does that. Stefan