home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13710 < prev    next >
Encoding:
Internet Message Format  |  1992-09-15  |  4.9 KB

  1. Path: sparky!uunet!sun-barr!olivea!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ucla-cs!netcon!intime.intime.COM!intime!scottm
  2. From: scottm@intime.intime.com (Scott Michel)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: zero-length datatype
  5. Message-ID: <SCOTTM.92Sep15105854@intime.intime.com>
  6. Date: 15 Sep 92 18:58:54 GMT
  7. References: <BuFx0t.IFA@intime.intime.COM> <1992Sep14.152627.6690@cadsun.corp.mot.com>
  8. Sender: scottm@intime.intime.COM (Scott Michel)
  9. Distribution: comp
  10. Organization: -- J/24 -- Racers Home for Programmers
  11. Lines: 89
  12. In-Reply-To: shang@corp.mot.com's message of Mon, 14 Sep 92 15:26:27 GMT
  13.  
  14. In article <1992Sep14.152627.6690@cadsun.corp.mot.com> shang@corp.mot.com (David (Lujun) Shang) writes:
  15.  
  16.    Newsgroups: comp.lang.c++
  17.    Path: intime.intime.COM!netcon!ucla-cs!elroy.jpl.nasa.gov!sdd.hp.com!caen!uunet!panther!mothost!motsrd!news
  18.    From: shang@corp.mot.com (David (Lujun) Shang)
  19.    Sender: news@cadsun.corp.mot.com
  20.    Reply-To: shang@corp.mot.com
  21.    Organization: Motorola, Inc., Software Research and Development, Rolling Meadows, IL. 60008
  22.    References: <BuFx0t.IFA@intime.intime.COM>
  23.    Distribution: comp
  24.    Date: Mon, 14 Sep 92 15:26:27 GMT
  25.    Lines: 39
  26.  
  27.  
  28. Why are you arguing with what I posted? You've said the same thing I
  29. have, but are trying to argue that we differ somehow. Granted there's
  30. a language barrier here, but you've essentially said that same thing
  31. I have, primarily that zero-length or no state objects don't make any
  32. philosophical sense.
  33.  
  34.    In article <BuFx0t.IFA@intime.intime.COM> scottm@intime.intime.COM (Scott  
  35.    Michel) writes:
  36.    > However, it's clear that the reason why C++ doesn't allow one to have
  37.    > a zero length object is that all instances of objects must be unique.
  38.  
  39.    An empty object has no state. You are not necessary to distinguish one 
  40.    empty object from the other. If a class can instantiate distinguished 
  41.    objects, it must be a non-empty class.
  42.  
  43. I hope I am necessary to distinguish one object from another, otherwise,
  44. I'd also be a non-entity too. :-)
  45.  
  46.    > This is a Reasonable Thing, otherwise you'd end up with real confusion
  47.    > in the language as to whether or not an object is really a stand-in or
  48.    > alias for another, and whether or not the object exists in the first
  49.    > place. 
  50.  
  51.    Since you are not neccessary to distinguish non-state objects, you are 
  52.    not neccessary to distinguish whether a non-state object is a stand-in 
  53.    or alias. With zero-length assumption, you can still use object address 
  54.    in implementation to judge whether such an object exists (newed with 
  55.    initialization). But again, you can not, nor need, using object address 
  56.    to ditinguish them from one to other.
  57.  
  58. I'm not sure I understand your point here. One the one hand, you're
  59. telling me that I need to make zero length objects be unique instances,
  60. but similtaneously, they need not be unique because I cannot look at
  61. the instance reference (address) to distinguish instances? I'm confused.
  62. (Another "A can be non-A similtaneously" pitfall.)
  63.  
  64.    > Is one zero-length object itself or a meta object for another?
  65.  
  66.    C++ has not meta-object. If an object has an ditinguishable meta object, 
  67.    it does have states.
  68.  
  69. Precisely why a zero-length object makes no sense. The only place I've
  70. found a zero length object to be useful is as a nexus of some sort or
  71. another, which would then cause me to question whether or not I have
  72. designed my classes correctly or not. Something without substance doesn't
  73. have much relevance, does it? Except as a meta-something?
  74.  
  75.    > According to Aristotle's theory of classes (and his philosophy as a whole)
  76.    > you'd force yourself into a situation where something can be itself and
  77.    > not itself similtaneously. 
  78.  
  79.    In fact, an empty class only has a single object instance. Therefore, 
  80.    when I say we need not distinguish non-state objects, they are still
  81.    distinguishable. It does not violate Aritotle's class thoery.  We 
  82.    should distinguish the storage that holds the object and the object 
  83.    itself. We cannot distinguish non-state object through its storage, 
  84.    since it occupies no storage.
  85.  
  86.    David Shang
  87.  
  88. Where did that assumption arise, that an empty class has a single object
  89. instance? ARE you saying is that we need not distinguish between
  90. zero-length (or no state) objects and state objects, because they belong
  91. to the generic class called object? It is the instances of the objects that
  92. has everyone worried, and the semantic consequence of that fiat decision.
  93. Secondly, what you've said (again for those of you who missed it the first
  94. time 'round) is that "non-state objects can exist even though they don't
  95. exist with any substance, and there's need to distinguish between one
  96. non-state object and another even though they exist as one single instance."
  97. That's how I read your statement, which does violate the Theory of Classes.
  98. It got you into the pitfall that A CAN BE NON-A AT THE SAME TIME.
  99.  
  100. Now go away before I taunt you a second time...
  101.  
  102. -scottm
  103.