enums
Russel Winder via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri May 30 08:30:04 PDT 2014
I think I have no idea what D enums are about.
Bearophile's example of some code in an email on another thread uses:
enum double p0 = 0.0045;
Now I would have written:
immutable double p0 = 0.0045;
or at the very worst:
const double p0 = 0.0045;
For me, enum means create an enumerated type. Thus "enum double" to
define a single value is just a contradiction.
Enlightenment required…
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at winder.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
More information about the Digitalmars-d-learn
mailing list