On Wednesday, March 5, 2003, at 09:59 PM, Mark Wilden wrote:
From: "Sean Charles" <[EMAIL PROTECTED]>Yup. And, worse luck, we had to take number one son to the hospital last night with a bad attack of croup, got back at 2am this morning. *Today* could be worse! Don't no-one nowhere mention C++ to me today. HA HA HA. *8-)
I have had a bad day and your attitude is just not called for I think.
BTW, IMO it's not a good idea to post when you've had a bad day. :(
No, you don't have to specify 'this' in member access from member code:Exactly! And thank the heavens too, because it is implicit within the context of the call...the compiler has provided 'this' because it knows that the receiver is foo or a superclass otherwise you'd have to specify 'this' absolutely everywhere. I am thinking of 'self' in Smalltalk now! Sad git I am!
struct foo { void bar(); void test() { bar(); /* no 'this' necessary */ } };
But you always have to specify 'this' with pointers to member functions, even from member code, and I can't remember the justification for that.
Like I said, the message has to go somewhere and if it ain't 'this' then the compiler assumes you know and therefore you must tell it so. The fact that you are even attempting(!) to use the 'pointer to member' operation gives you that freedom of receiver choice and thereby removes the 'this', making the compiler unsure and thus you must fill in the blanks. (NULLs??) That's how it works for me! Do you know Smalltalk? That's a great OO language to get good with. The grand-daddy of 'em all as far as OO goes IMHO, if you master that, everything else is a subset!
I'll stop there less I go misty-eyed/evangelical/AWOL/OT again! Needless to say, if I could get a job ST'ing tomorrow I'd be a happy hacker! PocketSmalltalk for Palm OS is good, dunno what state it's in these days....I'm off to have a look......
If you fancy a good chin-wag and gas off the list I'm always listening.
Sean Charles. (No Hard Feelings.......apart from the crusty bit on the sole of my foot : )
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
