Extended Type Design.

Derek Parnell derek at psych.ward
Sat Mar 17 19:43:18 PDT 2007


On Sat, 17 Mar 2007 19:09:16 -0700, Walter Bright wrote:

I'm sorry I'm so thick, but have I got the idea right yet ... ?
 
> final
 This applies only to assignments to Write-Once RAM locations. This can be
done by either the compiler or at run time depending on the amount of
knowledge the compiler has about the location's usage.

> const
 This is applied to declarations to prevent code in the same scope as the
declaration from being able to modify the item being declared.

> invariant
 This is applied to declarations to prevent code in the same application as
the declaration from being able to modify the item being declared.


As you can see, I'm confused as to how the qualifier effects which code is
allowed to change which items. Even more so when it comes to reference
items ... 'cos I'm not sure how to use these qualifiers to specify whether
the reference and/or the data being referenced can be changed, and by whom.


-- 
Derek Parnell
Melbourne, Australia
"Justice for David Hicks!"
skype: derek.j.parnell



More information about the Digitalmars-d mailing list