Globals resolution?
There are several. Pick your poison :p
Well, I'm going with "naming things after what they are".
Think Systems Hungarian. This is the one I always think of when I think of Microsoft.
I don't want to think about Hungarian notation. It gives me headaches.
Then we agree that there should be a different syntax for accessing instance members than accessing static members.
In C#, it is different, it just uses the same operator:
C++
1 2 3 4 5 6 7 8
|
class object {
public:
static void* pointer;
};
object o;
o.pointer; // Bad (albeit legal).
object::pointer; // Better.
|
C#
1 2 3 4 5 6 7
|
class Object {
public static IntPtr Pointer;
}
Object o;
o.Pointer; // Bad (illegal).
Object.Pointer; // Best.
|
Topic archived. No new replies allowed.