home *** CD-ROM | disk | FTP | other *** search
- 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
- From: scottm@intime.intime.com (Scott Michel)
- Newsgroups: comp.lang.c++
- Subject: Re: zero-length datatype
- Message-ID: <SCOTTM.92Sep15105854@intime.intime.com>
- Date: 15 Sep 92 18:58:54 GMT
- References: <BuFx0t.IFA@intime.intime.COM> <1992Sep14.152627.6690@cadsun.corp.mot.com>
- Sender: scottm@intime.intime.COM (Scott Michel)
- Distribution: comp
- Organization: -- J/24 -- Racers Home for Programmers
- Lines: 89
- In-Reply-To: shang@corp.mot.com's message of Mon, 14 Sep 92 15:26:27 GMT
-
- In article <1992Sep14.152627.6690@cadsun.corp.mot.com> shang@corp.mot.com (David (Lujun) Shang) writes:
-
- Newsgroups: comp.lang.c++
- Path: intime.intime.COM!netcon!ucla-cs!elroy.jpl.nasa.gov!sdd.hp.com!caen!uunet!panther!mothost!motsrd!news
- From: shang@corp.mot.com (David (Lujun) Shang)
- Sender: news@cadsun.corp.mot.com
- Reply-To: shang@corp.mot.com
- Organization: Motorola, Inc., Software Research and Development, Rolling Meadows, IL. 60008
- References: <BuFx0t.IFA@intime.intime.COM>
- Distribution: comp
- Date: Mon, 14 Sep 92 15:26:27 GMT
- Lines: 39
-
-
- Why are you arguing with what I posted? You've said the same thing I
- have, but are trying to argue that we differ somehow. Granted there's
- a language barrier here, but you've essentially said that same thing
- I have, primarily that zero-length or no state objects don't make any
- philosophical sense.
-
- In article <BuFx0t.IFA@intime.intime.COM> scottm@intime.intime.COM (Scott
- Michel) writes:
- > However, it's clear that the reason why C++ doesn't allow one to have
- > a zero length object is that all instances of objects must be unique.
-
- An empty object has no state. You are not necessary to distinguish one
- empty object from the other. If a class can instantiate distinguished
- objects, it must be a non-empty class.
-
- I hope I am necessary to distinguish one object from another, otherwise,
- I'd also be a non-entity too. :-)
-
- > This is a Reasonable Thing, otherwise you'd end up with real confusion
- > in the language as to whether or not an object is really a stand-in or
- > alias for another, and whether or not the object exists in the first
- > place.
-
- Since you are not neccessary to distinguish non-state objects, you are
- not neccessary to distinguish whether a non-state object is a stand-in
- or alias. With zero-length assumption, you can still use object address
- in implementation to judge whether such an object exists (newed with
- initialization). But again, you can not, nor need, using object address
- to ditinguish them from one to other.
-
- I'm not sure I understand your point here. One the one hand, you're
- telling me that I need to make zero length objects be unique instances,
- but similtaneously, they need not be unique because I cannot look at
- the instance reference (address) to distinguish instances? I'm confused.
- (Another "A can be non-A similtaneously" pitfall.)
-
- > Is one zero-length object itself or a meta object for another?
-
- C++ has not meta-object. If an object has an ditinguishable meta object,
- it does have states.
-
- Precisely why a zero-length object makes no sense. The only place I've
- found a zero length object to be useful is as a nexus of some sort or
- another, which would then cause me to question whether or not I have
- designed my classes correctly or not. Something without substance doesn't
- have much relevance, does it? Except as a meta-something?
-
- > According to Aristotle's theory of classes (and his philosophy as a whole)
- > you'd force yourself into a situation where something can be itself and
- > not itself similtaneously.
-
- In fact, an empty class only has a single object instance. Therefore,
- when I say we need not distinguish non-state objects, they are still
- distinguishable. It does not violate Aritotle's class thoery. We
- should distinguish the storage that holds the object and the object
- itself. We cannot distinguish non-state object through its storage,
- since it occupies no storage.
-
- David Shang
-
- Where did that assumption arise, that an empty class has a single object
- instance? ARE you saying is that we need not distinguish between
- zero-length (or no state) objects and state objects, because they belong
- to the generic class called object? It is the instances of the objects that
- has everyone worried, and the semantic consequence of that fiat decision.
- Secondly, what you've said (again for those of you who missed it the first
- time 'round) is that "non-state objects can exist even though they don't
- exist with any substance, and there's need to distinguish between one
- non-state object and another even though they exist as one single instance."
- That's how I read your statement, which does violate the Theory of Classes.
- It got you into the pitfall that A CAN BE NON-A AT THE SAME TIME.
-
- Now go away before I taunt you a second time...
-
- -scottm
-