Private default function arguments

bearophile bearophileHUGS at lycos.com
Fri Jan 15 01:41:29 PST 2010


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



More information about the Digitalmars-d mailing list