[Issue 9065] Please consider adding these std.traits

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 28 04:05:17 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=9065



--- Comment #47 from Manu <turkeyman at gmail.com> 2012-11-28 04:05:14 PST ---
(In reply to comment #46)
> (In reply to comment #45)
> > interested in knowing exactly how it is not like an enum, not internally, not
> > historically, but in terms of usage from a programmers POV?
> 
> It doesn't enumerate anything? Enumerations are collections of items, aren't
> they? How is one element a collection?

Then you need to disallow assigning explicit values to enum keys, that's not
strictly an enumeration either.
It just so happens that anonymous enums containing only a single value have a
nice little sugar such that you don't need to write the brackets. This is
because, in practise, this turns out to be a surprisingly common usage case so
the little sugar is nice.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list