Hi, i wrote: > > The overall design paradigm is object oriented but without fancy stuff > > like overloading or inheritance. Encapsulation and aggregation must > > suffice.
mick crane wrote: > This is interesting topic for me but don't know what these words > "overloading or inheritance. Encapsulation and aggregation" > mean in programming context Object orientation is a design pattern for programming. Invented already in the 1950s, it long time carved a miserable existence in let-the-machine-burst languages like Simula or Smalltalk. In the late 1980s it became the modern way of programming. To my knowlege, no other design pattern has yet really taken over that role. Pillars of OO are: Aggregation, Encapsulation, Inheritance, Polymorphism. Aggregation, already known in Structured Programming, consolidates a set of variables in a single container structure. This reduces the number of variables which you have to pass to called functions and helps to keep an overview what belongs where. Encapsulation hides the entrails of program parts from most other program parts so that only a well defined set of functions (aka "methods") is visible to the others and has to be kept stable for them. This gives the programmer more freedom to improve parts of the program without damaging other, unrelated parts. By these two gestures, "classes" and their "object instances" get defined. A class is a set of variable definitions and a set of methods which can operate on the variables. An object instance is a set of variable storage with individual values. It is subject to manipulation by the methods. A common analogy in biology is "species" and "individuum". (That's why the university where i studied offered Simula as language for biologists. You should have heard their comments after the first lecture which was held in our math faculty's rooms.) Inheritance strives for re-use of well working and tested program parts by declaring that a new class is like one or more existing classes with maybe some extra features and maybe some modifications of the existing features. The inheriting class only has the code that is missing in the bequesting classes, which contribute most of the code implementation. So here the programmer knocks over the clarity, which was gained by encapsulation and aggregation, by inventing nearly-but-not-really-same things and scattering their program code over larger parts of the program. Polymorphism (aka overloading) gives nearly identically looking program gestures different meanings. Classic is the overloading of the "+" operator for everything that a drunk mathematician would accept as some kind of addition. Plus string concatentation and maybe marriage of bits. If you fail to make your program unreadable by inheritance, try overloading. This will surely do the trick. A more substantial overview with a more polite opinion towards C++ et.al. can be found at https://en.wikipedia.org/wiki/Object-oriented_programming (Note the link box "Programming paradigms" to the right. There you find naivity, madness, and deep wisdom.) Have a nice day :) Thomas