Python 3K or Python 2.9?

TheFlyingDutchman zzbbaadd at aol.com
Wed Sep 12 20:33:36 EDT 2007


On Sep 12, 3:53 pm, Bjoern Schliessmann <usenet-
mail-0306.20.chr0n... at spamgourmet.com> wrote:
> TheFlyingDutchman wrote:
> > In C++ and Java I don't believe "this" is ever referred to as an
> > implicit function parameter.
>
> Oh yes, it is. All methods use it as a base address into instances.
> Implicitly though.

I am not talking about how the implementation of a C++ or Java
compiler uses the this pointer/this reference internally. I am talking
about how an author describes in English the "this" pointer/reference
in their book on programming C++ or Java.

I don't think you will find them saying that under the covers "this"
was passed to the method (if in fact it is). They just say that it
refers to the current object inside that object's method.

Here is a link to a tutorial where Sun is talking about the this
reference:
http://java.sun.com/docs/books/tutorial/java/javaOO/thiskey.html



> > If it is in fact a real parameter in the underlying compiled-code
> > implementation, that knowledge hurts more than it helps.
>
> To which language are you referring here, Python or C++? No matter
> what, I still don't really understand why it hurted.
>
I am referring to C++. If someone is trying to learn the language,
knowledge of the internal implemenation is counter-productive in my
opinion because it distracts from the details they need to learn. If
they are experienced and want to learn about the internals to
potentially help them code in the most blazingingly fast manner they
ideally would just be reminded they are using C++ and not some slower
byte-code executed language where it could possibly matter. ;)




More information about the Python-list mailing list