Thanks greatly. In literature, I often see LISP listed as a "Procedural" or "structured" language rather than being grouped with languages refered to as "Object Oriented", hence the question.
"Christopher Browne" <cbbro...@knuth.brownes.org> wrote in message
> In our last episode (Tue, 24 Oct 2000 22:39:26 -0500), > the artist formerly known as Esteban said: > >Forgive an ignorant question:
> >Is there an Object-Oriented version of LISP?
> Common Lisp was one of the first languages that was standardized with > "Object Oriented" capabilities. The only other language that might brag > of having OO earlier might be Ada.
> This question is roughly analagous to asking: > "Is there an Object-Oriented version of C++?"
In our last episode (Tue, 24 Oct 2000 22:39:26 -0500), the artist formerly known as Esteban said:
>Forgive an ignorant question:
>Is there an Object-Oriented version of LISP?
Common Lisp was one of the first languages that was standardized with "Object Oriented" capabilities. The only other language that might brag of having OO earlier might be Ada.
This question is roughly analagous to asking: "Is there an Object-Oriented version of C++?"
> Thanks greatly. In literature, I often see LISP listed as a "Procedural" or > "structured" language rather than being grouped with languages refered to as > "Object Oriented", hence the question.
If anything, it's "Functional". But all in all, it depends how you use it. You can code lisp which is basically imperative, or object oriented, or completely functional.
"Esteban" <h...@catfish.net> writes: > Forgive an ignorant question:
> Is there an Object-Oriented version of LISP?
One of them is CLOS aka Common Lisp Object System, Which incorporates OO-thingies into Common-Lisp. But you are free to to make it as "Object Orientated" as you wish in your implementation or need.
cor
-- (defvar my-computer '((OS . "GNU Emacs") (Boot-Loader . "GNU Linux"))) /* If GNU/LINUX has no solution, you've got the wrong problem */ /* Never install Slackware.........You might learn to use IT */ /* pa3...@amsat.org http://clsnet.dynip.nl */
Christopher Browne wrote in message ... >In our last episode (Tue, 24 Oct 2000 22:39:26 -0500), >the artist formerly known as Esteban said: >>Forgive an ignorant question:
>>Is there an Object-Oriented version of LISP?
>Common Lisp was one of the first languages that was standardized with >"Object Oriented" capabilities. The only other language that might brag >of having OO earlier might be Ada.
Simula and Smalltalk certainly have earlier claim to O-O than does Lisp. AFAIK, the first O-O implementation of Lisp was done by Howard Cannon at MIT, c. 1978-1979; it was called "Flavors", and was based on Smalltalk. It used a message- passing paradigm.
New Flavors, done by Dave Moon (then at Symbolics) was done c. 1984 was a re-implementation of Flavors that used a generic function paradigm, but did not include multi-methods.
CLOS was based closely on New Flavors, and added multi- methods and a true meta-object protocol. Gregor Kiczales, as everyone knows, was one of the driving forces behind this.
<s...@mediaone.net> wrote: > Christopher Browne wrote in message ... > >In our last episode (Tue, 24 Oct 2000 22:39:26 -0500), > >the artist formerly known as Esteban said: > >>Forgive an ignorant question:
> >>Is there an Object-Oriented version of LISP?
> >Common Lisp was one of the first languages that was standardized with > >"Object Oriented" capabilities. The only other language that might brag > >of having OO earlier might be Ada.
> Simula and Smalltalk certainly have earlier claim to O-O than > does Lisp.
Common Lisp had the first ANSI standard for an object-oriented language. Ada had the first ISO standard, AFAIK.
> AFAIK, the first O-O implementation of Lisp was > done by Howard Cannon at MIT, c. 1978-1979; it was called > "Flavors", and was based on Smalltalk. It used a message- > passing paradigm.
Other related influences:
- Frame Languages (based on the ideas of Marvin Minsky) - Actors (based on the ideas of Carl Hewitt)
> New Flavors, done by Dave Moon (then at Symbolics) was > done c. 1984 was a re-implementation of Flavors that used > a generic function paradigm, but did not include multi-methods.
> CLOS was based closely on New Flavors, and added multi- > methods and a true meta-object protocol. Gregor Kiczales, > as everyone knows, was one of the driving forces behind this.
LOOPS and later CommonLoops were influences for CLOS, too. Here is a nice reference:
> Thanks greatly. In literature, I often see LISP listed as a "Procedural" or > "structured" language rather than being grouped with languages refered to as > "Object Oriented", hence the question.
You will find that Lisp supports a great variety of programming styles. The availability of alternate ways of thinking about (and coding) solutions to problems is one of Lisp's many strengths. Lisp is one of the few really useful multi-paradigm languages (and arguably the only one). It also provides this capability in a way that does not compromise the elegance of the language. Rather than being "listed as a 'Procedural' or 'structured' language", it should be probably listed in a new category -- "Languages that other languages aspire to be".
* "Esteban" <h...@catfish.net> | Is there an Object-Oriented version of LISP?
There have been no non-object-oriented versions of Lisp at least since the mid-1980's. (Not counting Scheme as a version of Lisp.)
If you take the definitions of object-orientation seriously and don't get distracted by current implementations, Lisp has in fact _always_ been object-oriented, meaning specifically that objects in Lisp have identity and that functions and methods on Lisp objects refer to their type to decide what to do with them.
The Common Lisp Object System (CLOS) is a full-fledged, very mature implementation of the concepts of object-orientation, and it has been part of the Common Lisp language since the early 1990's and has been available for it since the mid-1980's. Other systems have also been found lurking within Common Lisp systems, such as Flavors.
What have you been missing or not finding?
#:Erik -- I agree with everything you say, but I would attack to death your right to say it. -- Tom Stoppard
In article <B2359AF058CB0305.FB05591C5DB26578.A4F3E1F03E271...@lp.airnews.net>,
Esteban <jaucquesdemo...@yahoo.com> wrote: >Thanks greatly. In literature, I often see LISP listed as a "Procedural" or >"structured" language rather than being grouped with languages refered to as >"Object Oriented", hence the question.
Well, not all Lisps are Common Lisp, so they don't all have the OO features. The Lisp family in general is usually called "functional".
Furthermore, the language taxonomists may not be familiar with the details of all the Lisp dialects, or may base their classifications on what they knew about the language a decade or two ago.
-- Barry Margolin, bar...@genuity.net Genuity, Burlington, MA *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups. Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
Thanks, everyone, for the very interesting responses. As you can see, I know little about LISP. I appreciate your kind and helpful responses to my question. It is quite unusual to ask a question on a newsgroup and not be flaggelated. I appreciate it. Would that all ng participants were so helpful.
"Esteban" <h...@catfish.net> writes: > Thanks greatly. In literature, I often see LISP listed as a "Procedural" or > "structured" language rather than being grouped with languages refered to as > "Object Oriented", hence the question.
This is partly because in recent years the long-standing term "object oriented" has been coopted from its original meaning and assigned a meaning that is both not appropriate to the name and only 85% applicable to Lisp.
The original meaning of "object oriented" meant "oriented around the idea that everything is an object". When you delve deeper into this, you find quickly that the only really true key to what that means is that (a) all data is perceived as an object [which is incidentally not true of Java, where there is data like int, float, etc. that are really not properly objects] and (b) where an object's identity is central to its being. [This is also not true of many so-called modern object-oriented languages. That is, you frequently get "call by value objects" where if I take an argument of type foo and you hand me an object of type foo, I might get a copy of your object rather than a pointer to it.]
In the more modern (and I think more broken) definition of "object oriented", everything revolves around the idea of "encapsulation" and whether there are certain properties of being able to expose or not expose implementation, etc. for the purpose of inheritance or client use. This is a useful concept but really has nothing to do with traditional object orientedness. Traditionally, I claim Lisp has been object-oriented even in dialects where you couldn't define new classes nor influence inheritance behavior in any way. That's because in such dialects identity was central, all arguments were passed by pointer, and object identity was the name of the game.
The notion of being able to extend an object oriented class system is useful but is not central. Moreover, it's a data abstraction violation (at the meta level) to say that a language is programmed in a certain way internally to its structures. To make your language definition depend on offering a model that imposes such an abstraction violation (asserting that what should not matter--implementation details--is central) seems silly to me.
ANSI CL is not, IMO, the only object oriented lisp. All lisps are object oriented. The notion that encapsulation defines what OO is is just silly. And the notion that C++ is OO just because it uses some form of encapsulation is downright laughable... C++ has numerous ways in which it really is not, IMO, OO. It sacrifices "identity" in too many places, not only in calls but also in the sense of its overly emphasizing static analysis of what an object's type will be rather than waiting until runtime; Java fixes some of this but not enough. The result is still that a method's "prejudice" about an object's type will often supersede better judgment that would come from actual inspection of the object's type and methods. Static dispatch is just too early to make wise decisions, and in a world that is ever more dynamic, this is not a positive trend in language design.
JMO. But thanks for asking. It's an interesting question. Btw, for more on this issue, see my Lisp Pointers article: ``What's in a Name? // Uses and Abuses of Lispy Terminology'' http://world.std.com/~pitman/PS/Name.html
> > Thanks greatly. In literature, I often see LISP listed as a "Procedural" or > > "structured" language rather than being grouped with languages refered to as > > "Object Oriented", hence the question.
> This is partly because in recent years the long-standing term "object oriented" > has been coopted from its original meaning and assigned a meaning that is both > not appropriate to the name and only 85% applicable to Lisp.
[lots of interesting stuff snipped]
I vaguely remember about 10-15 years back the term 'object based' being used. As far as I recall the term used was used to describe languages such as Ada. From what I can remember 'object based' was some kind of subset of 'object oriented'. I haven't run into the term for a long time now, and was wondering if it is still used and if so what the distinction is between OO and object-based. Just idle curiosity...
* "Guy" == Guy Footring <gfoot...@ford.com> writes:
Guy> I vaguely remember about 10-15 years back the term 'object Guy> based' being used. As far as I recall the term used was used to Guy> describe languages such as Ada. From what I can remember Guy> 'object based' was some kind of subset of 'object oriented'. I Guy> haven't run into the term for a long time now, and was wondering Guy> if it is still used and if so what the distinction is between OO Guy> and object-based. Just idle curiosity...
IIRC Grady Booch in his book[*] _Object_Oriented_Design_ used 'object oriented' and 'object based' terms to distinguish between languages that do support full 'magic set' of object orientedness (encapsulation, inheritance...) and languages providing only some subset of it.
-- Eugene
[*] The last edition sucks: everything but C++ was stripped out.
POOMAS: Poor Man's SIMULA, Version: 1, June 1972 ... Abstract: POOMAS is a collection of subroutines, macros, etc. which allow a programmer to write SIMULA-like simulation programs in BLISS. The POOMAS routines will handle queues, sequencing, random number generation, etc.
It used the BLISS built-in "EXCHJ" (exchange jump) coroutine call operator for light-weight threads, since each Simula object was also (potentially) a thread.
In 1983, Bakul Shah & I (at Fortune Systems) built a set of C libraries [presented at USENIX 1984] that did almost the same thing as POOMAS, and used them for simulations somewhat in the spirit of Simula. An "object" was a coroutine or "thread", that is, some subroutine with an (potentially) infinite loop in it [that provided the behavior of the object] and a piece of heap-allocated stack [that provided the state of the object, or instance slots, if you prefer]. Library calls could "wake" other threads/"objects", or could "sleep" waiting for events or the passage of (simulated) time -- any such sleep of course resulted in a coroutine call to the next available thread/object that was ready to run. During their lives, objects could create (and destroy) other objects, emit or receive messages, etc., etc.
So you definitely *can* do "object-oriented programming" in C... ;-} ;-}
-Rob
----- Rob Warnock, 31-2-510 r...@sgi.com Network Engineering http://reality.sgi.com/rpw3/ Silicon Graphics, Inc. Phone: 650-933-1673 1600 Amphitheatre Pkwy. PP-ASEL-IA Mountain View, CA 94043
> How does Simula and CLOS compare? And which historical links are > there between the two? Is Simula alive in any sence?
Simula was (sadly, IMO) switched for Java as beginner language a year or two ago here at the Department for Informatics at the University of Oslo, where the inventors of Simula, Ole-Johan Dahl and Kristen Nygaard, still work -- now both as prof. emerituses. Since then the language has rapidly gone out of use; I don't think it's used in any course now.
Btw., Ole-Johan and Kristen recently got the rank of commanders of the Order of St. Olav, the highest rank a civilian can get in Norway, for their contribution to the early research into object orientation.
Martin -- Unfortunately, the computer science departments in many universities apparently believe that fluency in C++ is more important than a sound education in elementary mathematics. -Leslie Lamport, Specifying Concurrent Systems with TLA+
Please forgive another ignorant question about the nature and character of LISP:
How might one rank LISP when viewing it in terms of the "high level" vs. "low level" continuum paradigm?
Like unto the previous question:
Does LISP have pointers, memory allocation, the like?
Thanks again for your patience and generosity with my curiosity about LISP.
(Pointers to good books (especially beginning treatises) on LISP programming, references, tutorials, web sites, etc. would be very greatly appreciated. I'd like to start my relationship with LISP off on the proverbial right foot.)
Not considering the history and evolution of the terms, it has always struck me that the term "object-oriented" at first hearing seems to suggest "inclined or oriented toward objects" or "with some consideration for objects". "object-based" seems to immediately suggest "based on objects". Of course, hearing it this way is backwards. I wish there were a term for "supports some kind of class definition system", as there are languages like JavaScript and Visual Basic that support objects in some general ways, but certainly aren't propertly OOPLs.
Perhaps there are some other terms for this out there?
"Eugene Zaikonnikov" <vik...@cit.org.by> wrote in message
> * "Guy" == Guy Footring <gfoot...@ford.com> writes:
> Guy> I vaguely remember about 10-15 years back the term 'object > Guy> based' being used. As far as I recall the term used was used to > Guy> describe languages such as Ada. From what I can remember > Guy> 'object based' was some kind of subset of 'object oriented'. I > Guy> haven't run into the term for a long time now, and was wondering > Guy> if it is still used and if so what the distinction is between OO > Guy> and object-based. Just idle curiosity...
> IIRC Grady Booch in his book[*] _Object_Oriented_Design_ used 'object > oriented' and 'object based' terms to distinguish between languages > that do support full 'magic set' of object orientedness > (encapsulation, inheritance...) and languages providing only some > subset of it.
> -- > Eugene
> [*] The last edition sucks: everything but C++ was stripped out.
"Esteban" <h...@catfish.net> writes: > Please forgive another ignorant question about the nature and character of > LISP:
> How might one rank LISP when viewing it in terms of the "high level" vs. > "low level" continuum paradigm?
i would place lisp on the high level side. however, lisp does have an extensive collection of math functions and bit-banging functions found elsewhere mostly in lower-level languages.
> Like unto the previous question:
> Does LISP have pointers, memory allocation, the like?
yes. the memory allocation is somewhat hidden. lisp does have pointers, but most of that is hidden too. in lisp, symbols often take the place of pointers (not counting C using pointers for iterators &c).
> Thanks again for your patience and generosity with my curiosity about LISP.
> (Pointers to good books (especially beginning treatises) on LISP > programming, references, tutorials, web sites, etc. would be very greatly > appreciated. I'd like to start my relationship with LISP off on the > proverbial right foot.)
> Is there an FAQ for this newsgroup?
-- J o h a n K u l l s t a m [kulls...@ne.mediaone.net] Don't Fear the Penguin!
In our last episode (Thu, 26 Oct 2000 20:38:22 -0500), the artist formerly known as Esteban said:
>Not considering the history and evolution of the terms, it has always struck >me that the term "object-oriented" at first hearing seems to suggest >"inclined or oriented toward objects" or "with some consideration for >objects". "object-based" seems to immediately suggest "based on objects". >Of course, hearing it this way is backwards. I wish there were a term for >"supports some kind of class definition system", as there are languages >like JavaScript and Visual Basic that support objects in some general ways, >but certainly aren't propertly OOPLs.
>Perhaps there are some other terms for this out there?
There are several different approaches to OO that are _substantially_ different.
If you think that there is a fixed way of describing what "object oriented" means, then you probably have only worked with one language "with objects," and probably only with C++...
If you want to get a feel for the "taxonomy," you should look to:
a) Simula b) Smalltalk c) LOOPS d) Flavors all of which were amongst the early "object systems."
For the most part, the only part that people tend to be familiar with is the stuff C++ inherited from Simula... -- cbbro...@hex.net - <http://www.ntlug.org/~cbbrowne/linux.html> Rules of the Evil Overlord #144. "I will order my guards to stand in a line when they shoot at the hero so he cannot duck and have them accidentally shoot each other. Also, I will order some to aim above, below, and to the sides so he cannot jump out of the way." <http://www.eviloverlord.com/>
In our last episode (Thu, 26 Oct 2000 20:33:11 -0500), the artist formerly known as Esteban said:
>Please forgive another ignorant question about the nature and character of >LISP:
>How might one rank LISP when viewing it in terms of the "high level" vs. >"low level" continuum paradigm?
How do you want to view it?
Lisp systems have been known to include assemblers, exemplified in the literature in Peter Norvik's book "PAIP" which presents a section on the construction of a Lisp compiler by compiling code using an assembler that is part of his Lisp implementation.
At the other end of the scale, Lisp is used to do, in the very same book, artificial intelligence applications that provide _very_ high level abstractions. Norvik's Othello implementation, for instance, plays a quite credible game of of Othello; given enough CPU and memory, it can likely outplay most human players.
>Like unto the previous question:
>Does LISP have pointers, memory allocation, the like?
Of course it does. Only a FORTH system implemented on a PIC with 128 bytes of memory wouldn't have those things.
Mind you, both pointers and memory allocation are largely kept "behind the curtain" in the vast majority of cases where you don't truly need to worry about them in that memory is managed using a garbage collection system.
>Thanks again for your patience and generosity with my curiosity about LISP.
>(Pointers to good books (especially beginning treatises) on LISP >programming, references, tutorials, web sites, etc. would be very greatly >appreciated. I'd like to start my relationship with LISP off on the >proverbial right foot.)
>Is there an FAQ for this newsgroup?
Paul Graham's "ANSI Common Lisp" is an excellent book on the topic.
For historical background and comprehensive and interesting material, Guy Steele's "Common Lisp The Language," available from Digital Press as well as in electronic form can let you get deeper. It is not authoritative compared to the Common Lisp HyperSpec, but I find it typically more useful due to the larger number of code examples. -- cbbro...@hex.net - <http://www.ntlug.org/~cbbrowne/lisp.html> When you open a bag of cotton balls, is the top one meant to be thrown away?
* "Esteban" <h...@catfish.net> | Please forgive another ignorant question about the nature and | character of LISP:
Ignorance has only one cure: Asking questions. Keep it up.
| How might one rank LISP when viewing it in terms of the "high level" | vs. "low level" continuum paradigm?
All over the range. Lisp as such has no limit downwards -- you can refer to any kind of object you want. Since you can expand the language any way you want, including optimizing the syntax for a special language, there is no limit upwards, either.
| Like unto the previous question: | | Does LISP have pointers, memory allocation, the like?
Yes, Lisp has pointers. No, you never see them, and you can't do arithmetic on them, and you never dereference them. That is, any object you deal with is actually a pointer to the object. The only exceptions here are characters and small integers. (If you really want to, you can use functions that come with most implementations that allow you to reference memory directly through an integer or special raw-machine-address thing.)
Yes, Lisp has memory allocation, but just like the pointers you don't see, you don't ever see the memory allocation. In Lisp, we allocate objects, not memory. That is, there is no such thing as raw, uninitialized memory to which you only have a machine address.
Yes, Lisp has the like, too.
| Thanks again for your patience and generosity with my curiosity about LISP.
No problem, but if you spell it "Lisp", you will also have entered the 1990's. Small caps went out of vogue in the publishing world sometime between 1988 and 1992 as far as I can tell, so now it is no longer customary to write UNIX, FORTRAN, LISP, COBOL, etc, in small caps like they were in their original literature, but Unix, Fortran, Lisp, and COBOL (some things just don't improve :).
| (Pointers to good books (especially beginning treatises) on LISP | programming, references, tutorials, web sites, etc. would be very | greatly appreciated. I'd like to start my relationship with LISP | off on the proverbial right foot.)
* Christopher Browne | For the most part, the only part that people tend to be familiar | with is the stuff C++ inherited from Simula...
Which, by the way, wasn't the truly interesting bits. Simula had garbage collection, coroutines, and supported simulation, hence the name. Bjarne wanted to do simulation, but, due to his proximity to the C world, wanted to do it in a C-like language. None of the stuff that supports simulation in Simula survived into the C world.
The kind of object system that Simula has is fantastically optimal for manipulating objects in a simulation. It is simply brilliant. However, if you don't do simulations of mostly real-world things, the object paradigm doesn't really work, the encapsulation stuff is more of a hindrance than a support, and the inheritance mechanisms don't make much sense being the exclusive approach. So Bjarne took all the bits that made Simula good for simulation, junked all the necessary support systems needed for simulation, and ended up with a model that doesn't really fit his support framework (which only does object creation and destruction and rudimentary type dispatch), only to have to add something so incredibly retarded as Templates because he failed to grasp what he had left out in his desire to copy Simula.
Bjarne claims to credit Simula, but C++ is a discredit to Simula if it pretends to have learned from it. Simula's pioneering work in object orientation for simulation deserves a legacy, not something so miserably idiotic as C++.
#:Erik -- Does anyone remember where I parked Air Force One? -- George W. Bush