How Nested Functions Work, part 1

Rainer Deyke rainerd at eldwood.com
Wed Sep 2 11:29:16 PDT 2009


Michiel Helvensteijn wrote:
> I still find it silly that it was built that way. Seems to me you should be
> able to forward-reference *any* symbol that has a value that can't change
> over its lifetime. Functions, const/immutable vars, typedefs, classes, etc.

That can lead to subtle problems in the case of functions:

int i = f();
int f() { return i; }


-- 
Rainer Deyke - rainerd at eldwood.com



More information about the Digitalmars-d mailing list