02-20-2019 05:17 AM
@abvenk wrote:
@crossrulz wrote:
@abvenk wrote:What's AE?
So just another name for FGV.
We are getting into semantics that I have been fighting for YEARS. I put the FGV as an AE that just has the Get and Set actions, making it functionally a global variable. And if that is what you are doing, you are better off with an actual global variable.
02-20-2019 08:45 AM
Yeah, a lot of it is just semantics. While my own internal thinking on the subject draws a bit fuzzier line than what crossrulz describes, I think his hardline definition is the most sensible and defensible one to try to adopt (or "enforce") community-wide. It is utterly clear and that alone is a huge first step toward a shared understanding.
2 related things to add. One is that there *can* be some debug usefulness to a pure FGV that only supports get and set operations. A conditional breakpoint within the set case can help reveal which *caller* of the FGV has set the bad value that breaks the code. You can't do that with a native global.
The other is that when the global data is a cluster, wrapping up access in a function call provides a mechanism to make "set" actions on individual cluster elements atomic. See this current, ongoing thread for more info.
-Kevin P