I am rewriting an application in Mathematica. The previous version used global variables, which I find distasteful, but to avoid it I am needing to pass several static Datasets and Associations around a lot. What is the recommended practice here?
I import several files from CSV into Datasets. They aren't particularly large, but they are used for a lot of the processing. This is a sustainability-oriented business simulation game, played at live events by 100+ people.
There is immutable data in the form of datasets for market forces, investment, and available innovations. There are also mutable constructs, primarily in the form of KPI data that we use to measure progress.
All of these interact, so I end up with a lot of functions like:
that call other functions that require that data as well. Several of these tables vary based on number of teams or other factors as well. One thing I've thought about doing is using a function in the local variable definition of Module to generate them separately as locals, as least for the immutables:
I'd love an RTFM if that's around.