Puzzled by this behavior

Ola Fosheim Gr ola.fosheim.grostad at gmail.com
Wed Jun 1 08:22:24 UTC 2022


On Wednesday, 1 June 2022 at 07:54:04 UTC, FeepingCreature wrote:
> implementing dynamic scoping. But D is lexically scoped for 
> functions, not just with nested functions but with every 
> language element.

The functions foo and bar are in the same scope, checking for 
initialization before use is not strictly related. Also goto can 
jump to a forward label, so C allows some forward references.


More information about the Digitalmars-d mailing list