Director Web : OOPs

Peter Small's OO view of Lingo

I don't think you can talk about Lingo as being "an OO language". I think the correct question to ask is "can Lingo support OO programming".

OO is not a language: it is a mind set; a conceptual approach. It is the splitting up of a complex system into discreet sub-sections which are then called objects. The essence of OO is that these objects are self contained units which cooperate and communicate with each other through suitable protocols to do the systems stuff. This is in stark contrast to the conceptualization of a system as one single complete structure.

OO programming is the deliberate intention of visualizing a project in terms of separate units. Each part (object) is constructed independently and then the parts are assembled together much the way you would construct a Legoland structure. This technique has several important advantages over the "one complete system" approach.

  1. Different people can work on different parts of a program at the same time.
  2. Design can be from the ground up - that is getting small sub assemblies working then adding further sub assemblies as the project progresses
  3. Debugging is greatly simplified because design faults are limited to known areas.
  4. Alterations and modifications can be made easily and simply because any changes effect only small sections and do not effect the system as a whole (particularly useful if a client requests changes at the last minute.
  5. The design can be improved and modified in small increments, one part (object) at a time, allowing the system to improve and update through a gradual evolutionary process - rather than have infrequent and expensive major overhauls or system updates.
  6. Allows the multiple use of small subassemblies as building blocks.
  7. Facilitates creative design strategies where the final form is not known at the commencement of a project but evolves as a result of inspirational experiments during construction.

Lingo has three features which facilitate OO:

  1. The birth function: which allows any number of identical copies of an object to be made from a script template (parent script).
  2. Property: which allows objects to maintain their own private globals (for individual object states or memories)
  3. Ancestor: which allows objects to share properties or handlers.

The birth function allows complex programming structures to be created from standard building blocks. The property feature allow each of these building blocks to have unique characteristics. The ancestor feature facilitates message paths through groups of objects, allowing the trapping of messages by specific objects.

In this sense, Lingo is a language which can facilitate OO.

This is the concept of OO as I am trying to get it across in my weird book on Lingo. It's a personal view so don't take it for gospel. I'd be interested on other viewpoints in this matter because in these conceptual things there is never any definitive answers.

Hoping that this opens the can of worms,

regards

Peter Small