You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The section "Name binding and variables" is confusing, this reads (bold added by myself):
Nested beneath the predeclared block is the module block, which contains the bindings of the current module. Bindings in the module block (such as a, b, c, and h in the example) are called global and may be visible to other modules. The module block is empty at the start of the file and is populated by top-level binding statements, but an application may pre-bind one or more global names, to provide domain-specific functions to that file, for example.
Nested beneath the module block is the file block, which contains bindings local to the current file. Names in this block (such as a and b in the example) are bound only by load statements. The sets of names bound in the file block and in the module block do not overlap: it is an error for a load statement to bind the name of a global, or for a top-level statement to bind a name bound by a load statement.
Reading the parts in bold. Based on the first paragraph a and b are bind at the module block, and as such are called globals. Based on the second paragraph, a and b are bind at the file block. Also based on the second paragraph, my reading is that the module block and file block should not overlap and that it is an error if they do. Given that based on the reading, all load statements would bind to both module block and file block then this should cause an error.
The text was updated successfully, but these errors were encountered:
A possible fix would be to specify that load statements should only bind to the file block, and specify that both the module block and file block are visible from other modules. I think that other possible fixes are available, but not as simple to explain.
The section "Name binding and variables" is confusing, this reads (bold added by myself):
Reading the parts in bold. Based on the first paragraph
a
andb
are bind at the module block, and as such are called globals. Based on the second paragraph,a
andb
are bind at the file block. Also based on the second paragraph, my reading is that the module block and file block should not overlap and that it is an error if they do. Given that based on the reading, allload
statements would bind to both module block and file block then this should cause an error.The text was updated successfully, but these errors were encountered: