From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,82c7a4dae672250f X-Google-Attributes: gid103376,public From: ok@goanna.cs.rmit.EDU.AU (Richard A. O'Keefe) Subject: Re: "Object" types vs. "Value" types Date: 1996/03/27 Message-ID: <4jahd9$906@goanna.cs.rmit.EDU.AU>#1/1 X-Deja-AN: 144394260 references: <199603250902.KAA21800@email.enst.fr> organization: Comp Sci, RMIT, Melbourne, Australia newsgroups: comp.lang.ada Date: 1996-03-27T00:00:00+00:00 List-Id: gauthier@unilim.fr (Michel Gauthier) writes: >The initial publication about objects versus values is by Bruce MacLennan >in a Sigplan paper in 1982 (and a 1981 printed school course). Surely the _initial_ publication of the idea goes back at least as far as Simula 67, which used ":=" for value assignment and ":-" for object reference assignment, precisely because they were understood as distinct. >Some programming consequences of the distinction : > - lists organize objects only, and I am not sure that they are objects > (they are not values) This is news to the functional programming community, who think that the sequence [1,2,3,4] is every bit as much a value as the sequence 1234. In functional languages, [1,2,3,4] = [1,2,3,4]. > - stacks and queues organize values only, and are objects (a) Why can't a stack or queue hold an object? (Consider the case where this is the _only_ occurrence of the object.) (b) I have used stacks and queues in programming languages with no notion of assignment, no notion of object identity, and where two stacks holding the same sequence of values necessarily satisfied the built in equality. > - implementing stacks with lists implies some (generally hidden) > handling of objects designed to keep values > - lists of values are sequences rather than really lists We can all play definitional games if we want to. Haskell programmers think the things they are dealing with "are ... really lists" despite the fact that they behave like mathematical values. I heartily agree with the to-me-familiar distinction between objects and values, but to me it is mutable lists which feel as if they are "not really lists". But this is to argue about *words* rather than *realities*. There is already a 'mutable'/'immutable' distinction around; how exactly does that relate to the 'object'/'value' distinction? >I am convinced that the distinction between objects and values is essential for >the future of programming. I try to convince other people. -- The election is over, and Australia lost; the idjits elected _politicians_! Richard A. O'Keefe; http://www.cs.rmit.edu.au/~ok; RMIT Comp.Sci.