enum value vs. immutable

CJS Prometheus85 at hotmail.com
Sun Dec 1 21:57:32 PST 2013


I was reading the enum page of Ali Çehreli's (excellent) D book 
(http://ddili.org/ders/d.en/enum.html), and I'm confused by an 
enum value (not enum type), such as
    enum secondsPerDay = 60 * 60 * 24;
In that situation I would have used an immutable variable. Is 
there any reason to prefer enum vs. immutable when defining 
constants?


More information about the Digitalmars-d-learn mailing list