anything like C++ references?
Stephen Horne
intentionally at blank.co.uk
Mon Jul 14 19:08:58 EDT 2003
On 14 Jul 2003 10:30:22 -0400, aahz at pythoncraft.com (Aahz) wrote:
>In article <7dc4hvslh7a8fk9p6cvsfqa1c8d44rmmnv at 4ax.com>,
>Stephen Horne <intentionally at blank.co.uk> wrote:
>>
>>C++ has precisely one type of variable. That variable is a placeholder
>>for a value of a datatype which is specified in the declaration. The
>>datatype may be a pointer datatype, but so what? Pointer datatypes are
>>not treated any differently than other datatype except that they, like
>>all datatypes, they have their own set of functionality.
>
>Really? I would argue that the differing syntaxes is an argument
>against a single type of variable. What happens with this:
>
>char a;
>a->b;
To answer this, I simply have to restore the quote you deleted...
: On 13 Jul 2003 21:03:59 -0700, owski at hotmail.com (Adam Ruth) wrote:
:
: >I don't see the arbitrary change. Python has one type of variable: A
: >pointer that cannot itself be dereferenced. It's much more consistent
: >then having 3 types of variables (in C++).
This is not referring to data types - there are far more than three
data types in C++. It is referring to whether something is a pointer
or a reference or not. The mistake in Adams post simply being that
these are simply datatypes.
You will note that even in my words, I tried to keep the distinction
clear by using the word 'datatypes' when I was referring to datatypes.
In fact, lets look back at my first two scentences in your quote of my
reply.
>>C++ has precisely one type of variable. That variable is a placeholder
>>for a value of a datatype which is specified in the declaration.
One *type* of variable, which is associated with its own *datatype*.
I find it hard to see how you could confuse this, but given my own
mistakes - well, we're all human I suppose.
More information about the Python-list
mailing list