4 ms·
> identifiers in the body of a function aren't resolved until the function itself is executed (if ever) and at the point everything in the module scope has been
by pansa2 2y ago
> identifiers in the body of a function aren't resolved until the function itself is executed (if ever) and at the point everything in the module scope has been defined
Yes, so within a function you can refer to things that are defined later in the module. Isn't that's a "forward reference", even if the details are slightly different from how they work in D?
- almostgotcaught 2y ago[flagged]
- pansa2 2y agoYou're right, it's not the same mechanism. But in this particular context it has the same effect - it allows you to define functions in a source file in arbitrary order.