Steve D'Aprano wrote:
[quoting Scott Stanchfield] Figure 7: (Java) Defining a Dog pointer Dog d;When you write that definition, you are defining a pointer to a Dog object, not a Dog object itself. [end quote] Here Scott mixes up what the compiler does (creates a pointer to a Dog object, and what the programmer's Java code does (creates a Dog).
Um, no. The declaration 'Dog d' on its own does NOT create a Dog, in any way, shape or form. It only declares something that can *refer* to a Dog created elsewhere, which is what Scott is quite correctly saying.
I expect this is because, as a "compiler guy", Scott probably doesn't really believe that objects are values.
Please stop insulting Scott's intelligence, and that of other "compiler guys", by suggesting that they don't understand things as well as you do. -- Greg -- https://mail.python.org/mailman/listinfo/python-list
