[Issue 9065] Please consider adding these std.traits

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 27 22:39:13 PST 2012


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


Rob T <alanb at ucora.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alanb at ucora.com


--- Comment #42 from Rob T <alanb at ucora.com> 2012-11-27 22:39:06 PST ---
(In reply to comment #26)
> (In reply to comment #24)
> > What the compiler calls stuff internally has no bearing on
> > what users of the language will call things.
> 
> It's not an internal thing, that declaration is not an enum declaration,
> period. enum is used as a keyword for more than one thing, which is bad, but
> it's too late to change it now. 
> 
> We shouldn't name things in Phobos based on what people might think is right or
> looks right, but based on what the things really are.
> 
> It's a shame we don't have a 'manifest' keyword of some sort, it would help
> avoid confusion. I guess 'enum' was used to cut back on having too many
> keywords in the language.
> 
> Anyway it's documented behavior, see "manifest constants" here (it's at the
> bottom): http://dlang.org/enum.html

As far as I was concerned, these are anonymous enum members in the case where
there's only one member and the { } were omitted. I understood it in this way
by reading the specification here: http://dlang.org/enum.html. It actual made
some sense to me.

The use of "manifest constant" terminology elsewhere will likely cause a lot of
confusion. Why not term it as an "anonymous enum constant", or "enum manifest
constant" if that suits the usage better. Term it anything so long as "enum" is
in there so as to avoid the inevitable confusion elsewhere.

-- 
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