Nested functions should be exempt from sequential visibility rules

stas stasoid at yahoo.com
Wed Oct 10 21:55:32 PDT 2012


>> The most flexible method is to declare a local, nested struct.
> ... it's an awesome solution.

It is a solution, but IMO it looks unpleasant.
Reminds me C++, where I had to do this trick all the time.

> It's a morass of special cases.

If D had a notion of pure pure functions - pure functions without 
any "concessions to practicality" then we could consider this 
simple rule:
"local pure pure functions can be forward referenced".


More information about the Digitalmars-d mailing list