On Saturday, 31 May 2014 at 20:14:59 UTC, bearophile wrote:
Miles Stoudenmire:

In contrast to those two examples where immutable can be used at compile time, what are some other cases where it is necessary to use enum instead of immutable?

By default use enum if you define a compile-time-known value, unless it's composed data like an array, etc.

Bye,
bearophile

'enum' as a manifest constant keyword has been an unpopular decision from its introduction. "Everybody" agrees that it should be changed. Everybody but Walter -- at DConf2014 Walter said (again) that using "enum" was okay because people get used to it!

The only reason given is that re-using a keyword is supposed to be easier than introducing a new one. That is manifestly false. ;)
  • enums Russel Winder via Digitalmars-d-learn
    • Re: enums bearophile via Digitalmars-d-learn
      • Re: enums Philippe Sigaud via Digitalmars-d-learn
        • Re: enums H. S. Teoh via Digitalmars-d-learn
          • Re: enums Philippe Sigaud via Digitalmars-d-learn
    • Re: enums monarch_dodra via Digitalmars-d-learn
      • Re: enums Andrej Mitrovic via Digitalmars-d-learn
        • Re: enums Miles Stoudenmire via Digitalmars-d-learn
        • Re: enums bearophile via Digitalmars-d-learn
          • Re: enums Paul D Anderson via Digitalmars-d-learn
            • Re: en... bearophile via Digitalmars-d-learn
            • Re: en... Timon Gehr via Digitalmars-d-learn
            • Re: en... monarch_dodra via Digitalmars-d-learn
              • Re... Chris Nicholson-Sauls via Digitalmars-d-learn
                • ... bearophile via Digitalmars-d-learn
                • ... Chris Nicholson-Sauls via Digitalmars-d-learn
          • Re: enums Philippe Sigaud via Digitalmars-d-learn
    • Re: enums Ali Çehreli via Digitalmars-d-learn
      • Re: enums Philippe Sigaud via Digitalmars-d-learn
      • Re: enums Steven Schveighoffer via Digitalmars-d-learn

Reply via email to