Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: anonymous functions (no documentation yet)



Peter wrote:
> Note this does not affect cases like
> 
>   $emptyvariable() { ... }

Out of interest, how does it affect:
  ""() { ... }

I partly ask because in the same way that
  f g() { ... }
defines two functions,
  f ''() { ... }

might have the effect of defining a function f and running it
immediately. And then you might write: f '' ''() { ... } and so on.

What effect does all this have on the positional parameters?

Given that this feature will be seen as similar to plain { ... },
people might find it confusing that redirections don't work. I know
that you already know this but in other shells, redirections on function
definitions are allowed and form part of the function.

Oliver



Messages sorted by: Reverse Date, Date, Thread, Author