3 ms·
Good info here but Lisp has not historically been "object oriented." The CLOS (Common Lisp Object System) was added later as an abstraction layer over more fund
by mimixco 8y ago
Good info here but Lisp has not historically been "object oriented." The CLOS (Common Lisp Object System) was added later as an abstraction layer over more fundamental Lisp concepts.
One of the most beautiful things about Lisp is that has neither modules, objects, routines, callbacks, variable types, or any of the other cruft of more recent languages. (It is the second oldest computer language.) But -- it can provide all of those things if the programmer wants them.
- kazinator 8y agoIt depends on what you mean by "object-oriented". A Lisp with no formal OOP system still has objects: conses, strings, symbols. These are nicely abstracted: they are defined by operations which construct, access and otherwise manipulate them. These entities have an identity (which we can test with eq) and carry a type. They can move around freely in the program. There is genericity without OOP: features like car working not only on a cons cell, but also on the nil object. Or length calculating the length of a vector, string or list. All of this stands in contrast to a procedural paradigm in which there are just storage locations operated on by code, having whatever type the code believes them to have. (Algol 68, Fortran 66, C).
- mimixco 8y agoI think OOPS as a paradigm is pretty well defined without my laying it out. The facts are that Lisp did not have OOPS at the beginning but it's easy to add, and that's one of the greatest strengths of Lisp as a programming language. You can build any programming concepts from modern languages that you want -- but you aren't constrained by any of them.
- lispm 8y ago> Lisp has not historically been "object oriented." Historically Lisp was among the first object-oriented languages in the mid 70s. It was also the first standardized object-oriented language (in 1994). The original Lisp was used for object-oriented modeling in the 60s - way before objects were identified as a programming paradigm. Objects were defined as symbols with property lists. Property lists were pairs of keys and values (sounds familiar?). Early Lisp papers also used the idea of classes and more. > was added later as an abstraction layer over more fundamental Lisp concepts No, CLOS was added as a new programming paradigm into the first Common Lisp variant - similar how one would add a Prolog-like language to Lisp. CLOS was also a third or fourth generation system. It was based on earlier object-oriented extensions to Lisp Lisp: LOOPS, Common LOOPS, Flavors, New Flavors, some more primitiv Class system, ... Lisp did not include many/most of the CLOS abstractions, but Lisp enables to implement and integrate them seamlessly.