r/programming • u/lelanthran • Sep 09 '26
Implementation of GCC's Nested Functions (vs. C++ Lambdas)
https://uecker.codeberg.page/2026-09-05.html
19
Upvotes
r/programming • u/lelanthran • Sep 09 '26
View all comments
3
u/jonathancast Sep 11 '26
This article was really confusing. If nested functions have the same type as global functions, then what happens if you pass a pointer to a nested function to another function? How does the other caller know to pass it the extra parameter? The whole point of C++ lambdas is they have a different type than functions, because the calling convention is different.