real simple manifest constant question probably regret asking...

WhatMeForget via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Mar 15 20:27:16 PDT 2017


One of my D books says: "an enum declared without any braces is 
called a manifest constant." The example shows,

enum string author = "Mike Parker";

Is this equivalent to
const string author = "Mike Parker";
or
immutable string author = "Mike Parker";

I guess what I'm asking is does enum give you some advantages 
over say non-enum constants?

Thanks.



More information about the Digitalmars-d-learn mailing list