comp.lang.ada
 help / color / mirror / Atom feed
From: ian@loral.UUCP (Ian Kaplan)
Subject: Re: Definition of Buzzwords: "Object-Oriented"
Date: Mon, 4-Feb-85 10:47:28 EST	[thread overview]
Date: Mon Feb  4 10:47:28 1985
Message-ID: <777@loral.UUCP> (raw)
In-Reply-To: 247@cheviot.UUCP

In article <247@cheviot.UUCP> robert@cheviot.UUCP (Robert Stroud) writes:
>
>But it *is* possible to define abstract types in Modula-2, (or Ada - hiss!).
>
>Modula-2 lets you export a TYPE name without defining the TYPE structure -
>this is called "opaque export" and is discussed under "14. Compilation Units"
>in my version of the Modula-2 Report.
>
>You can then declare variables of this type, but the only way you can use
>them is as parameters to procedures or functions exported by the MODULE
>which defines the TYPE - where the internal structure is known. So if
>we have a MODULE StackDef which EXPORT's the TYPE Stack and procedures
>Push and Pop, we can write....
>
>	FROM StackDef IMPORT Stack, Push, Pop;
>
>	VAR
>	  S : Stack;
>
>	BEGIN
>	   ...
>	   Push(S, ...);
>	   Pop(S, ...);
>	   ...
>	END;
>
>You even have to call an exported procedure (not shown) to initialise
>the Stack before you use it - unlike Ada, Modula-2 does not allow
>initialisation at declaration.
>
>This is *not* the same as Concurrent Pascal notation, 
>
>	S.Push(...); S.Pop(...);
>
>but the difference is really just philosophical - does the operation
>belong to the object or vice-versa. Some would say that this makes
>a language "object-oriented" rather than "procedure-oriented" although
>the distinction is purely syntactic sugar.
>
    ... more discussion regarding packaging in Ada etc....

>Is it possible to focus on that difference and produce
>a definition of "object-oriented" that *excludes* Modula-2??
>
>Robert Stroud,
>Computing Laboratory,
>University of Newcastle upon Tyne.
>
>ARPA robert%cheviot%newcastle.mailnet@mit-multics.arpa
>UUCP ...!ukc!cheviot!robert
>

  The point that I was trying to make in my Concurrent Pascal example was
  that there should be a strong association between the data structure and
  the operations that can be perfored on it.  I think that Robert Stroud is
  probably right when he states that the differences between my Concurrent
  Pascal example and the way the same thing is done in Modula is syntatic
  sugar.  
  
  After I wrote my article several other people pointed out that
  the real difference between Modula (or Ada) and an object oriented 
  language like Smalltalk or C++ is inheritance.  Inheritance allows new
  abstract data types to be formed from the "properties" of other abstract
  data types.  In a way, inheritance does for abstract data types what user
  defined data types does for elementary data types in Modula.

  When discussion the differences between a "truely" object oriented
  language and Modula with a friend, my friend pointed out that you must
  make a distinction between what you can simulate in a language and the
  properties of the language.  For example, a programmer can simulate
  recursion in FORTRAN by using an array like a stack, but recursion is not
  one of the features of FORTRAN.  There is clearly some overlap between the 
  object oriented languages and Modula or Ada.  Despite this overlap, they 
  really are different languages.  
  
  I think that the problems we are all having in defining the 
  differences between object oreinted languages and Modula is that
  until recently (when the mini-Smalltalk implementation became available)
  object oriented languages were not generally available.  I believe that
  if we were to use object oriented languages, rather than just read
  about them, the difference would be much more apparent.

  By the way, from what I understand AT&T has no plans to release C++.  If
  this is true, I think that it is a real loss to the computer science
  community.

				 Ian Kaplan
				 Loral Data Flow Group
				 Loral Instrumentation
				 (619) 560-5888 x4812
			 USENET: {ucbvax,ihnp4}!sdcsvax!sdcc6!loral!ian
			 ARPA:   sdcc6!loral!ian@UCSD
			 USPS:   8401 Aero Dr. San Diego, CA 92123

  reply	other threads:[~1985-02-04 15:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4288@ucbvax.ARPA>
     [not found] ` <366@cavell.UUCP>
1985-01-25 19:51   ` Definition of Buzzwords: "Object-Oriented" Ian Kaplan
1985-01-31 20:10     ` Robert Stroud
1985-02-04 15:47       ` Ian Kaplan [this message]
1985-02-07 18:45         ` Definition of Buzzwords: "Object-Oriented" (really C++) Arnold Robbins
1985-02-05 16:21       ` Definition of Buzzwords: "Object-Oriented" Juha I. Heinanen
1985-02-11  9:52         ` Dick O Schefstr|m
replies disabled

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