3 ms·
Yes, you can do it that way. But then you'll need a "context pointer" to pass references to the locals it'll need, and the function will need to be located "som
by WalterBright 9y ago
Yes, you can do it that way. But then you'll need a "context pointer" to pass references to the locals it'll need, and the function will need to be located "someplace else", meaning it is not encapsulated.
I've done that for years with C and C++. Nested functions are so much nicer and clearer.
- vram22 9y agoGot it now, thanks. I've used nested functions in Python and they have some good uses. Will check them out in D.