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
Importing a module should never have side effects (such as executing a print(); statement). This would allow Wheel programmers not to have to worry about import order of modules.
Consequences
Modules would need to only allow function declarations, class declarations, and imports at the top level. (Potentially, imports could be restricted to the top-level, which would make the cycle checker somewhat simpler; the parser could even add the import list to the parsed Module value (see type definition))
The program's entrypoint would have to be further narrowed down - presumably a main() function inside the Main module. (Potentially the main() function would be passed an args value using the Wheel LinkedList class, instead of the current import args from Args convention)
Exporting single values would be more difficult, though they could be exported as fields on an object.
Importing a module should never have side effects (such as executing a
print();statement). This would allow Wheel programmers not to have to worry about import order of modules.Consequences
Modulevalue (see type definition))main()function inside theMainmodule. (Potentially themain()function would be passed anargsvalue using the WheelLinkedListclass, instead of the currentimport args from Argsconvention)