Oh no, nested functions are a terrible, insecure hack that are far too verbose to be ergonomic closures :(
Of course, that’s why I said it’s good for hacking.
Although I’m not sure I agree about the “ergonomic” thing.
Wouldn't you just use a lambda nowadays?
Not in C you wouldn't.
You can with Clang’s blocks extension: https://en.wikipedia.org/wiki/Blocks_(C_language_extension)
Sure, but the parent post was saying they didn't like nested function handling in c++.
Nested functions don't exist in C++ (except for lambdas).
[1] https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html