4 ms·
Some might also argue that "private methods", which are visible to every other method in a class, are a bad thing, rather than making a nested function within t
by Roboprog 9y ago
Some might also argue that "private methods", which are visible to every other method in a class, are a bad thing, rather than making a nested function within the only function / method that used said code.
One of the things I used to be able to do in Pascal, that C ... Java and their ilk took away. Fortunately, most FP languages gave that back, with interest (closures).
- int_19h 9y agoC# just got true nested functions back in 7.0. Although, as you have said, it is somewhat redundant with closures, and even more so with local type inference. C++, C# and Java all let you do what effectively amounts to a local function these days.