--- Comment #13 from Manu <turkey...@gmail.com> 2012-04-22 04:02:16 PDT ---
(In reply to comment #12)
> (In reply to comment #8)
> > I need to reiterate the consistency issue. Other superfluous
> > attributes appear to be silently ignored where they are not
> > applicable. __gshared makes no sense on a function, but it doesn't
> > complain, as is static, shared, immutable, etc.
> By "superfluous", do you mean "redundant" or "not making sense in the
> This is an important distinction to consider.
Both are true for other attributes. __gshared makes no sense applied to a
function, static applied at the global scope however is at least redundant,
I think it depends how you look at it. The colon syntax isn't really an
explicit application of an attribute to everything that follows (at least, it
doesn't seem to be that way for all other attributes at this time). The policy
already seems to be be defined as applying the attribute only those items it is
applicable to, the only exclusion at this time seems to be final.
> (In reply to comment #10)
> > It's clearly a bug. All other attributes work as expected.
> Not sure what you mean by that....
'__gshared:' doesn't cause errors, neither does 'immutable:', or any others I
tried. They all have cases where they are not applicable, but they are silently
ignored, as final should be.
> (In reply to comment #11)
> > Seeing as DMD ignores most no-op attributes, I have no idea why
> > this is the one where it suddenly decides that it should generate
> > an error. I think final on variables should just be ignored, in
> > keeping with other attributes.
> What particular "other attributes" are you talking about?
shared, __gshared, immutable at least.
> Thinking about it now, variables can't be overridden, and so essentially are
> already final. Banning them from being declared final might be considered
> silly on this basis. So final on member variables is redundant,
Excellent point :)
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------