In C++ we use double colon (::
) to access members of namespace, use dot (.
) to access members of class/structure and use arrow (->
) to access members of class/structure via pointer.
Wouldn't it be possible to use just dot (.
)? E.g. my_namespace.my_class.my_static_pointer.my_member
. Why are separate lexemes used? Would there be any problems with syntax, if only dot (.
) were used for all three cases?