Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!pasteur!ucbvax!asgard!serge From: serge@asgard.uucp (serge) Newsgroups: comp.lang.c++ Subject: Re: const, reference "this" revisited ??? Message-ID: <23134@ucbvax.BERKELEY.EDU> Date: 26 Feb 88 23:28:41 GMT References: <6590014@hplsla.HP.COM> <6590018@hplsla.HP.COM> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: serge@berkeley.edu (serge) Organization: University of California, Berkeley Lines: 19 In article <6590018@hplsla.HP.COM> jima@hplsla.HP.COM (Jim Adcock) writes: >So my only thought was if there was someway to state a given vfuncX() DOES >NOT clobber *this then this and this->vtable would only have to be loaded >into registers once at the start of vfunction, and thereafter calling a >vfuncX() would only entail an indirect-with-offset function call. This issue (and others) could be addressed if the method definition/invocation syntax was method(x, y, z ...); instead of x.method(y, z ...); This would have the advantage that + one could specify attributes of `this' (const, reference, etc.) + there would no longer be a need for `this' keyword + syntax would be simpler and more uniform (method == overload) + it would allow for multiply polymorphic methods (!)