IDEA: Use Unix-style chmod values for const and invariant
Russell Lewis
webmaster at villagersonline.com
Thu Nov 29 09:32:56 PST 2007
Ok, I was pondering, trying to figure out some sort of syntax which
would allow us to communicate "const" and "invariant" in a way that's
easy to learn & remember. Maybe we could learn from UNIX file
permissions, where you can see both the owner's permissions to the file,
and "other's" permissions. In that case, we have these comparisons:
const: rw-r--r--
invariant: r--r--r--
Which leads me to this concept for alternative keywords:
const: const_wr
invariant: const_rr
Sure, the first time that a C++ programmer sees this, he won't know
exactly what it means, but it is (IMHO) easy to learn & remember.
More information about the Digitalmars-d
mailing list