comp.lang.ada
 help / color / mirror / Atom feed
From: ok@goanna.cs.rmit.EDU.AU (Richard A. O'Keefe)
Subject: Re: "Object" types vs. "Value" types
Date: 1996/03/27
Date: 1996-03-27T00:00:00+00:00	[thread overview]
Message-ID: <4jahd9$906@goanna.cs.rmit.EDU.AU> (raw)
In-Reply-To: gauthier-2603961247040001@164.81.60.62

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.




  reply	other threads:[~1996-03-27  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-03-25  0:00 "Object" types vs. "Value" types Jean-Pierre Rosen
1996-03-25  0:00 ` Robert Dewar
1996-03-26  0:00 ` Michel Gauthier
1996-03-27  0:00   ` Richard A. O'Keefe [this message]
1996-03-27  0:00     ` Robert Dewar
1996-03-27  0:00 ` Michel Gauthier
  -- strict thread matches above, loose matches on Subject: below --
1996-03-26  0:00 Jean-Pierre Rosen
1996-03-15  0:00 Comments on generic stack? Michel Gauthier
1996-03-20  0:00 ` "Object" types vs. "Value" types John G. Volan
1996-03-20  0:00   ` John DiCamillo
1996-03-21  0:00     ` Comments on generic stack? John G. Volan
1996-03-21  0:00   ` "Object" types vs. "Value" types david scott gibson
1996-03-25  0:00     ` John G. Volan
1996-03-28  0:00       ` david scott gibson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox