Re: Deinition of OOP needed for programming language documentation

From: Matthieu Villeneuve (matthieuDOTvilleneuve_at_freeDOTfr)
Date: 12/06/04


Date: Mon, 6 Dec 2004 13:24:55 +0100


"christopher diggins" <cdiggins@videotron.ca> wrote in message
news:6sPsd.4935$Ou1.505450@weber.videotron.net...
> I am working on the documentation for my programming language, Heron, and
I
> am trying to come up with a good introduction and definition of OOP. I
> currently have the following:
> Object oriented programming ( OOP ) refers to a technique and style of
> programming which allows software to be expressed as a set of interacting,
> objects. An object is a unique instance of an abstract data type commonly
> called a class.
>
>
> Definitions of an object vary from language to language, but the following
> are common requirements:
>
> a.. polymorphism - objects may under certain circumstances be used
> interchangeably with objects with different types
> b.. encapsulation - an object groups together data and methods for
acting
> on that data. This is related to the concept of increasing cohesion, i.e.
> the logical grouping of related data and functionality within a module
> c.. information hiding - an object provides a mechanism to hide data and
> implementation details that should not be made accessible to users of the
> object. This is related to the concept of decreasing coupling, i.e.
> reduction of dependencies between modules.
> d.. identity / state - an object must have a unique identity and state
> separate from other objects of the same type. This is, in large part, what
> differentiates an object from a module.
> Any comments or suggestions? TIA

The Common Lisp Object System (CLOS) is a bit different from most other
mainstream languages. For instance, methods do not belong to classes,
but to "generic functions". This allows adding methods without having
the definition of a class or the right to modify it. Also, introspection
mechanisms allow one to discover lots of information about various
components of the system, including for example the list of fields of
a class, which prevents the "information hiding" mentioned above.

So Common Lisp seems to partly fail some of your requirements, although
it is generally considered as a "valid" OO language (and one of the most
advanced ones). I guess that just means that OO is not a precisely
defined concept (or at least that various different precise definitions
exist)...

--
Matthieu Villeneuve


Relevant Pages

  • Re: CL & Practicality
    ... but Java probably has more than twenty times as ... > many as Common Lisp, depending on what you consider to be the equivalent ... You're conflating core language and core language+library issues but yes, ... the best way to discover the practicality of Common Lisp is to ...
    (comp.lang.lisp)
  • Re: How Common Lisp sucks
    ... necessities in today's world. ... getting acceptance of a considerable number of members in the Common Lisp community. ... Now you are apparently invoking a defacto standard. ... If we don't find a single example for changing the language in a fundamental way that would actually make the language easier to understand for newbies without loosing expressiveness, ...
    (comp.lang.lisp)
  • Re: pseudo code v/s algorithm
    ... insert your language here) than code. ... There is absolutely no difference between algorithm and code, ... If I have an implementation or pseudo-code it cannot be ... just have a look at the sources of some Common Lisp ...
    (comp.programming)
  • Re: Noob Wonders: Lisp-1 vs. Lisp-2
    ... “Now, the question is, why do Lisps before Common Lisp have this multi- ... language that is characterized by uncommon or pretentious ... losing the debate, and I felt it wasn't for reasons I considered "fair". ... using the term "Scheme" as the opponent position. ...
    (comp.lang.lisp)
  • Re: Lex, Yacc, and Lisp...
    ... Common Lisp specification. ... I have been involved both in implementing languages for Java and for Common Lisp. ... If you take a look around in the Java world what language extensions people are working on, and risk to take a look behind the scenes, you can tell that this is mostly the same everywhere. ...
    (comp.lang.lisp)