A really stupid question, I fear.
If I have some kind of declaration of some ‘variable’ whose value
is strictly known at compile time and I do one of the following
(rough syntax)
either
enum foo = bar;
or
const foo = bar;
or
immutable foo = bar;
then is there any downside to just using enum all the time?
- I don’t need to take the address of foo, in fact want to
discourage &foo, (as I said, given that I can do so)
Is there any upside either to using enum?
I’m a bit nervous about using immutable having had bad allergic
reactions when passing immutable ‘variables’ to functions and so
just tend to use const or enum.