@everywhere inside a module

I mean, that might work in some situations, but it’s really not the solution you want.

You generally want modules to only define the machinery that they need. And then you create functions that can be called to run that machinery.

Detangling these things is a very good thing. Modules are generally setup such that they can be defined at any time. And then they have functions that do the interesting work.

Or you can have scripts — external to the module — that run the functions defined by the module.

1 Like