Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!scherzo!allegra!alice!bs From: bs@alice.UUCP Newsgroups: comp.lang.c++ Subject: Re: const, reference "this" revisited ??? Summary: an open question Message-ID: <7684@alice.UUCP> Date: 11 Feb 88 02:32:30 GMT References: <6590015@hplsla.HP.COM> <1988Feb9.101643.2495@mntgfx.mentor.com> Organization: AT&T Bell Laboratories, Murray Hill NJ Lines: 20 Posted: Wed Feb 10 21:32:30 1988 Archie Lachner from Mentor Graphics Corporation writes > Efficiency issues aside, it would be nice to have some mechanism by which > one could specify which member functions were legal for use with constant > objects and which were legal only for non-constants. For example, it is > not now currently possible to specify that the member function "operator=()" > should not be applied to constants. The mechanism of optionally specifying > "this" as an argument to a member function could conceivably be used to solve > this problem. I don't think that there is an efficiency issue (that is, there may be an issue over the efficiency of a given implementation - cfront output is only as efficient as the equivalent C, it could be more efficient - but there is no need for new language features to support even further speedups), but there certainly is a need to review the relation between ``const objects'' and member functions. I'm not yet quite sure how to deal with that issue. Ideas?