bearophile: > OK, I'll use a static nested function then, it's not as clean as adding a > "private" attribute, but probably there's not enough need to add other > features to the language: > > int foo4(int x) { > int foo4inner(int x, depth=0) {
It's not as clean indeed, there's a little bug there! Fixed: static int foo4inner(int x, depth=0) { Clean semantics is always better to avoid bugs :-) Bye, bearophile