home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object
- Path: sparky!uunet!spool.mu.edu!uwm.edu!ux1.cso.uiuc.edu!cs.uiuc.edu!johnson
- From: johnson@cs.uiuc.edu (Ralph Johnson)
- Subject: Re: Object hidden state and side effects
- Message-ID: <BzIFGp.K7@cs.uiuc.edu>
- Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL
- References: <1992Dec14.112222.13987@kei.is.s.u-tokyo.ac.jp> <1992Dec15.014420.6604@midway.uchicago.edu> <1992Dec16.65250.10645@kei.is.s.u-tokyo.ac.jp> <1992Dec16.175126.14968@midway.uchicago.edu>
- Date: Sat, 19 Dec 1992 14:12:25 GMT
- Lines: 35
-
-
- In article <1992Dec16.65250.10645@kei.is.s.u-tokyo.ac.jp> jeff@is.s.u-tokyo.ac.jp writes:
-
- >I am really at a loss here. What exactly (in concrete real terms) do
- >you expect people to do differently when using true for example once
- >it is recognized as a value and not an object?
-
- dave@alex.uchicago.edu (Dave Griffith) writes:
-
- >Express their actual intent clearly and precisely, without requiring
- >unneccessary contortions to map their intent to a overly limitted language.
- >But I've always been a dreamer.
-
- This does not seem to me to be an answer "in concrete real terms".
-
- The difference between an "object" and a "value" seems to be that for
- a value, equality can be implemented by bit comparison of the things,
- while objects can only use identity of addresses in memory or else
- require a user-supplied function. Isn't this just a result of immutability?
-
- >But most languages have no way to _enforce_ the requirement that they "only
- >allow operations that are in line with their essential sameness".
-
- Most languages have no way to enforce anything that is interesting.
- We can't really enforce that a subclass provides the same behavior
- as a superclass. In C++, I can enforce that a virtual function will
- return an integer, but not a positive integer (except by making a
- class for positive integers). I can enforce that a sort function
- take a boolean valued binary function as a parameter, but not that
- it provide a total ordering on the collection to be sorted. We need
- to improve the expressive power of our languages. I think that trying
- to solve this problem just by making a value/object distinction is like
- applying a bandaid to someone who had a leg cut off.
-
- -Ralph Johnson
-