Extended Type Design - existing keywords
kris
foo at bar.com
Fri Mar 16 14:46:06 PDT 2007
Andrei Alexandrescu (See Website For Email) wrote:
> Sean Kelly wrote:
>
>> For what it's worth, I like: 'final', 'view', and 'const' the best.
>> They're all short and meaningful, given the intent for each.
>
>
> The problem with 'view' is that it's a noun, while final and const are
> adjectives. It's very awkward to use 'view':
>
> view int * p = &x; // huh?
How about this? Using existing keywords, with a rename of "const":
1) final - rebinding of a value to a name
2) invariant - a read-only view of a data structure
3) constant - a value that never changes
More information about the Digitalmars-d
mailing list