M
Mike Meyer
Bryan Olson said:Didn't I? "Type", or "data type" or "datatype", plus "abstractMike said:Well, Google didn't turn anything up. On the other hand, "object" and
"value" are pretty poor terms to google with. Maybe you can suggest
better ones?
data[optional-space]type.
You mentioned those in close connection with Wickipedia, so I only
checked there. In retrospect, those probably don't work well, as we've
already established that datatypes don't necessarily have to have
values.
The term "data type" implies instances have data; is it clear
enough that a datum is a value?
Actually, what "data type" implies to me is that data have a type. But
skip that for now - what's the data that goes along with an instance
of object?
The fact that general principles and results depend on each
object having a value implies they must.
*What* general principles? *What* results?
You seemed to disagree when I said "the logic of 'types'
is reasonably well-defined in the discipline". If you're
just talking about Python, then the Python Language
Reference is right simply by status.
That my repeated requests for a definition of "type" (or "object) have
never been answered suggest very strongly to me that the logic of
types is not well-defined.
And I'm trying to find out if there is any justification for the
statement made in the Python Programing language. If there's some good
reason that valueless objects can't (or shouldn't) exist in general,
that will do. If there's some reason they can't (or shouldn't) exist
in Python, that will do - though I'm also interested in the general
question.
What I'm *not* interested in is examples from other programming
languages. That they fail to let you have objects without values no
more proves that objects can't have values than Python not letting you
take the address of a variable provesd that variables can't have
addresses.
[...]I'm still not sure that there's only one value forOk, so the objects identity is not it's value. Right.
Otherwise, the claim
"the type object has only one value" would be false.
objects of type 'object'.
Well, if you can identify the set the values are drawn from, that
would go a long way towards settling that issue.
My textbooks are in storage too, but you'll find plenty if
you look. Remember learning about "call by value"? Did they
have to deal with objects without a value to pass?
No. But in Python, "call by reference" has to deal with objects
without a reference to pass. So what?
Discussion involving an object's value would have to be rewritten
to cover the case of objects that don't have one. Is a valueless
object mutable or immutable? Let's see; the Reference says:
Objects whose value can change are said to be mutable;
objects whose value is unchangeable once they are created
are called immutable.
Your valueless objects break the definitions. The Ref says
"An object's mutability is determined by its type" so it
must have some mutability status to determine. Want to
re-work the literature to cover your special case?
So you're claiming that "all objects have values" is a convenience,
like "x raised to the power 0 is 1"?
Got any references yourself? Where's the literature on typed
objects that don't have values?
Ain't got none. On the other hand, I'm not trying to prove that such
objects exist. I'm trying to find out if there's any justification for
claiming that they don't exist.
Did the references make clear to you that this usage of 'type'
means 'data type'?
Yes - but we've already established that some data types don't have
values associated with them, so that doesn't really do much
good.
<mike