3 ms·
I've never really thought to use nested functions for that. I guess I've never really thought of what nested functions were for.
by s73v3r_ 9y ago
I've never really thought to use nested functions for that. I guess I've never really thought of what nested functions were for.
- gmueckl 9y agoWelcome to the lambda party ;). Passing nested functions as pointers is how lambdas often work behind the scene.
- Roboprog 9y agoThose of us who had nested functions/procedures and “procedural types” in Pascal (or Algol, but that’s beyond my experience) back in the day have :-) Then K&R came, and took our nice toys away. Fortunately, the GNU Pascal compiler needed nested subroutines, so they exposed the feature in their C compiler, as well.
- pjmlp 9y agoAnd now even C# has them. :) On C++ we can fake them with lambdas.