arild
08/23/2019, 10:01 AMval might be const but it is useful not to make it const?diesieben07
08/23/2019, 10:05 AMconst means the value of the variable will be inlined everywhere it's used. So if you can foresee ever changing the value you should not make it const.hugo.matilla
08/23/2019, 10:27 AMDominaezzz
08/23/2019, 10:28 AMarild
08/23/2019, 10:46 AMconst if it is assigned a literal value and is either top-level, or a member of an object declaration, any change I would make to it would only happen in the context of recompiling anyway, which means the new value would be inlined wherever the const was used. Is there a case when using reflection, perhaps? Or some manner of hot module reloading?Dominaezzz
08/23/2019, 10:50 AMarild
08/23/2019, 1:06 PM