samifox Posted August 30, 2013 Posted August 30, 2013 Hi i've read about ActiveX and Visual Lisp as being Object Oriented Language. please explain where and when it comes handy, and were things like Inheritance, implementation, Classes, Derivation ,Collections Interfaces and Type Libraries fit in it. Thanks Shay Quote
irneb Posted August 31, 2013 Posted August 31, 2013 (edited) There's many different "levels" of "object oriented programming". VLisp (IMO) is not OO, it's just using the ActiveX libraries which are structured in an OO-like manner (i.e. a hierarchy of "objects" with their own properties and methods). ADesk (when they stole the code from XLisp to create AutoLisp) cut out lots of the basic stuff of Lisp, things like special functions, macros, argument modifiers, etc. were dropped to make ALisp much smaller. Because of these omissions it's very difficult (or even impossible) to use ALisp/VLisp in a "true" OO fashion. VLisp never re-introduced these. It simply added some functions so it could link to ActiveX/COM objects. So ALisp/VLisp is still only a very small subset of Lisp itself, OO being one of the aspects which are missing in them. At least VLisp used Common Lisp's method of working with objects - the functions are designed to resemble CL's CLOS methods and accessors. But there the resemblance stopped. If you want an explanation of OOP, that would be a book of discussions about various ideas. Even searching the internet on this topic would provide you with long articles focusing on only a subset of full OO. From my own experience, the system which seems to come closest to full OO would be Common Lisp's CLOS system, especially if you also use the MOP extension to that. Perhaps Simula/SmallTalk (the first languages to introduce OO ideas) would be close, CLOS was designed from SmallTalk's principles. Even stuff like C#/Java/Python (those languages usually associated with OO these days) is not fully implementing all ideas of OO, just the most common and/or easiest to implement. E.g. most would disallow multiple inheritance because it's so difficult to implement. Java (for instance) only allows a class to inherit from one parent class, they've allowed multiple interface inheritance - but that's not the same thing. An interface is much like a "template" for creating a class, basically telling you what to name your methods and what arguments and results they should have, not like true inheritance which incorporates the parent's methods, properties and data as if they're part of the child. Edit: You might want to take a look at this to see OO more fully explained: http://www.codeproject.com/Articles/22769/Introduction-to-Object-Oriented-Programming-Concep Edited August 31, 2013 by irneb Quote
BlackBox Posted August 31, 2013 Posted August 31, 2013 Interesting topic... And great information as always, Irne I'm relatively new to development in general (as most of you know), but having just started delving into the .NET API from Visual LISP, the first 'wow' aspects for me were learning about inheritance, overloads, and even extension methods. LISP particularly could/should allow for Method overloads, given that a LispFunction only has a single argument... The ResultBuffer. ... Again, very interested to see where this topic goes Cheers Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.