Path: utzoo!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!softrue!kearns From: kearns@softrue.UUCP (Steven Kearns) Newsgroups: comp.lang.c++ Subject: overloading operator . and -> Message-ID: <14.UUL1.3#8618@softrue.UUCP> Date: 12 Mar 91 14:26:41 GMT Organization: Software Truth Lines: 22 I know it is too late now, but here is my opinion on how operator . and operator -> should have been overloadable:' Notice that in the current definition, X->f is really short for (X->) ->f . I find this strange to say the least. Really, we should be able to overload not operator ->, but operator ->f and operator->g(int x) etc... In other words, the real operation being applied to X in X->f is "arrow f". This provides more flexibility than the current system because you are not restricted to eventually returning something for which ->f makes sense. It also seems more intuitive to me. -steve ******************************************************** * Steven Kearns ....uunet!softrue!kearns * * Software Truth softrue!kearns@uunet.uu.net * ********************************************************