Re: difference
From: E. Robert Tisdale (E.Robert.Tisdale_at_jpl.nasa.gov)
Date: 02/01/04
- Next message: Richard Heathfield: "Re: the trouble with mex c"
- Previous message: Thomas Matthews: "Re: Troll Alert: Christian Bau"
- Maybe in reply to: nospam: "Re: difference"
- Next in thread: Richard Heathfield: "Re: difference"
- Reply: Richard Heathfield: "Re: difference"
- Reply: pete: "Re: difference"
- Reply: Richard Bos: "Re: difference"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 31 Jan 2004 21:31:45 -0800
Joe Wright wrote:
> Hallvard B Furuseth wrote:
>
> [ snip ]
>
>>I think integer constants are objects,
>>and that what this text refers to
>>is lvalues like *p where p points to freed memory.
>>That freed memory is no longer an object.
>
> From K&R2 A4 p195
> "An object, sometimes called a variable, is a location in storage,
> and its interpretation depends on two main attributes:
> its 'storage class' and its 'type'."..
>
> That doesn't sound like a constant to me.
> I must have missed something important earlier.
> Give me an example of an integer constant that you think is an object.
For the definition of the term object,
you should consult an English language dictionary:
Brian W. Kernighan and Dennis M. Ritchie weren't trying
to define an object in the "object oriented" sense.
That is still an *unfinished* task which you should ask about
in the comp.object newsgroup if you are interested.
I think that it is safe to assume that Kernighan and Ritchie
meant both constants and variables here --
constants must be *initialized* after all.
What is clear from the K&R definition is that
objects are *data* objects
in the context of the C programming language.
They occupy (or, at least, could occupy)
some sort of memory storage -- registers, virtual memory, etc.
They were not talking about so-called real world objects.
Whether data objects exist or not may be irrelevant
if there is no way to reference them in the current scope.
- Next message: Richard Heathfield: "Re: the trouble with mex c"
- Previous message: Thomas Matthews: "Re: Troll Alert: Christian Bau"
- Maybe in reply to: nospam: "Re: difference"
- Next in thread: Richard Heathfield: "Re: difference"
- Reply: Richard Heathfield: "Re: difference"
- Reply: pete: "Re: difference"
- Reply: Richard Bos: "Re: difference"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|