<p>Hi CF Community, I’d like to get your opinions. Would you prefer final variables to be immutable or not? Currently, a “final” variable just means you cannot make the reference point to something else. However, who would find it more useful if “final” meant the data structure pointed by it will not be mutable? Example: `final myVar = {foo=”bar”}; myVar.foo = “baz”` Who would prefer that to not throw an exception (current behavior) or to throw an exception? Thanks!, -Aaron</p>
<p>The post <a rel="nofollow" href="https://coldfusion.adobe.com/2018/04/final-immutable-or-not/">final == immutable? (or not?)</a> appeared first on <a rel="nofollow" href="https://coldfusion.adobe.com">ColdFusion</a>.</p>
Comments: