Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Are there tips to follow when working with pool dictionaries?

0
Posted

Are there tips to follow when working with pool dictionaries?

0

Yes. In general, replace pool dictionary values using the at: method. If you replace the pool dictionary associations (or the entire pool dictionary itself) then you need to recompile all the methods that reference it’s values. When a method uses a pool constant, the association from the pool is stored directly in the compiled method. At execution time, the value is taken from the association and used. If you update the association value (using #at to the “new” pool will not be reflected in the execution of the code (until it gets recompiled). It is always best to establish pool dictionaries at load time by using toBeLoadedCode for your application. Even if you cannot assigned values immediately (ie, they must be computed through the application’s logic), you should still build the dictionary with keys and use some form of lazy initialization to enter the values at an appropriate time. This helps not only with import/export, but also for loading your application into fresh images.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123