Indeed, every time I overload an operator for a C++ class, I _cringe_
inside because I have to declare it with the "wrong" number of arguments.
uint64::operator += (uint64 &y)
*this = *this + y;
uint64::operator ~ ()
uint64 result( ~lo );
result.hi = ~hi;
Regardless of language convention, in reality "+=" needs two arguments
and "~" needs one ... and "object.method(x,y,z)" needs four <wink>.
I really don't appreciate C++ magically initializing the magic "this"
variable for me, and positively hate that it then goes on to (in effect)
magically prepend "this->" to instances of the object's attributes'
names (I hate it a month later, when I'm trying to figure out what the
code thinks it's doing ...).
Miale's thesis didn't suggest the latter (thanks, Steve <smile>!), but I
think overstated the virtue of the former. Seems to me that the only
clear benefit in changing Python to magically set a magic "self" variable
would be to meet autopilot expectations derived from prior experience
with other languages. That's never a great argument, although it's often
a decent one. Are there other benefits?
happy-the-way-it-is-ly y'rs - tim
Tim Peters firstname.lastname@example.org
not speaking for Kendall Square Research Corp