Path: utzoo!mnetor!uunet!husc6!hao!ames!sri-spam!distek4!mckenney From: mckenney@sri.com (Paul E. McKenney) Newsgroups: comp.lang.c++ Subject: Why doesn't c++ allow overloading member operators? Message-ID: <11778@sri-spam.istc.sri.com> Date: 15 Mar 88 23:31:57 GMT Sender: nobody@sri-spam.istc.sri.com Reply-To: mckenney@sri.com (Paul E. McKenney) Organization: SRI International Lines: 13 Several c++ gurus around here told me that it is usually bad practice to allow explicit access to instance variables in c++, that it was better to define member functions to do the job. This seemed very strange to me until I found that c++ does not allow redefinition of the `.name' operators. Of course, if you cannot redefine these functions, then allowing explicit access to the instance variables will `freeze' the representation of the object -- bad for software maintenance. So, why doesn't c++ allow `.name' operators to be redefined? Thanx, Paul mckenney@sri.com