www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - final keyword?

reply Jason House <jason.james.house gmail.com> writes:
Reviewing online docs, I see mention of final in a few places I don't expect
it.  Am I misunderstanding the current design?

http://www.digitalmars.com/d/declaration.html lists final as a storage class
option.  I believe variable declarations can no longer be declared final.

http://www.digitalmars.com/d/function.html lists "in" as "final const scope".
Jan 02 2008
parent reply Walter Bright <newshound1 digitalmars.com> writes:
Jason House wrote:
 Reviewing online docs, I see mention of final in a few places I don't
 expect it.  Am I misunderstanding the current design?
 
 http://www.digitalmars.com/d/declaration.html lists final as a
 storage class option.  I believe variable declarations can no longer
 be declared final.
But functions can be.
 http://www.digitalmars.com/d/function.html lists "in" as "final const
 scope".
I'll fix, thanks.
Jan 04 2008
parent Jason House <jason.james.house gmail.com> writes:
Walter Bright Wrote:

 Jason House wrote:
 Reviewing online docs, I see mention of final in a few places I don't
 expect it.  Am I misunderstanding the current design?
 
 http://www.digitalmars.com/d/declaration.html lists final as a
 storage class option.  I believe variable declarations can no longer
 be declared final.
But functions can be.
I don't believe the online docs discuss this subtlety anywhere. The declarations page doesn't even discuss the meaning of the final keyword.
Jan 04 2008