Time ago I have heard that "enum" is useless and const/immutable suffice.

AFAIK it wasn't clear, it was said that we adopted this usage of "enum" just because of some bugs in "const/immutable" but we also know "enum" and "immutable" have difference(s), especially related to this issue. We can't replace "enum" with "immutable". Answering my own question on another reply, for arguably same reasons function(constant) pair is not expected to run at compile-time unless it was labeled with "enum" or "static".

Reply via email to