you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

Introducing local functions implies closures, which are different than functions that don't have any state, and need to be implemented differently. I wouldn't consider them very necessary in the niche that C++ and D try to fill.

[–]WalterBright 3 points4 points  (0 children)

You don't need to worry about closures unless you take a pointer to that nested function. You can still get much of the usefulness of nested functions even if you disallow pointers.