Russel Winder:

For me, enum means create an enumerated type. Thus "enum double" to define a single value is just a contradiction.

Enlightenment required…

In D enum can be used to define manifest constants. This means constants known at compile time. In practice for a double there isn't a lot of difference. In general you can't take the address of a manifest constant, unlike immutables.

Bye,
bearophile
  • 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: enums bearophile via Digitalmars-d-learn
            • Re: enums Timon Gehr via Digitalmars-d-learn

Reply via email to