Jump to content

Recommended Posts

Posted

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

Posted (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 by irneb
Posted

Interesting topic... And great information as always, Irne :thumbsup:

 

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 :geek:

 

Cheers

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...