Three very simple questions
ahsoftware at sonic.net
Sun Apr 26 15:23:58 EDT 2020
On 4/26/20 12:09 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
> "globals are evil"
> But we use one array
> Global gConfigA
> and we stuff it with all manner of "things" including another arrays
> it turns about to quite useful
Yes, I do what you and Jacque do as a workaround, of course. I recently
implemented a feature management infrastructure the same way, given the
lack of globally available constants.
put "feature1,feature2,feature3" into g<app>Features
...some other stack
if "feature2" is among the items of g<app>features then
delete variable g<app>Features
great for A/B testing, rolling out new features without messing with
existing code, being able to roll back unwanted or not-working features
after beta testing... and would be so much cleaner if we didn't have to
resort to global variables and remember to put a reference to them in
each place they're referenced...
ahsoftware at gmail.com
More information about the use-livecode