Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What mathematical duals are there in OO programming?

If you have watched Going Deep shows of the Channel9 lately, one very frequently mentioned topic is mathematical duality in programming. TomasP has a good blog post about duality in object oriented programming.

This has been since Microsoft Research found that the observer design pattern is actually a mathematical dual of the iterator pattern. Since then they have used the duality concept in various ways.

My question is:

What mathematical dualities are there in programming?

Object oriented programming is a good start. The major GoF design patterns are: Decorator, State, Iterator, Facade, Strategy, Proxy, Factory Method, Adapter, Observer, Template Method, Composite, Singleton, Abstract Factory and Command. Here is a good object-graph-poster.

like image 603
Tuomas Hietanen Avatar asked Jul 28 '10 12:07

Tuomas Hietanen


People also ask

What are the two main aspect of OOP?

Classes and objects are the two main aspects of object-oriented programming.

What is meant by OO programming?

Object-oriented programming (OOP) is a style of programming characterized by the identification of classes of objects closely linked with the methods (functions) with which they are associated. It also includes ideas of inheritance of attributes and methods.

What is an object and a class in OO approach?

A class is a template for creating objects in a program, whereas the object is an instance of a class. A class is a logical entity, while an object is a physical entity.

Is a language based on OO concepts?

A language based on OO concepts that describes as a set of diagrams and symbols you can use to graphically model a system. Used to represent data and their relationships within the larger UML object-oriented system's modeling language.


1 Answers

I'd say the primary duality in programming is the code-data duality, most clearly exposed in Lisp, but also clear in most contemporary languages which provide introspection functionality.

like image 172
Gintautas Miliauskas Avatar answered Nov 07 '22 04:11

Gintautas Miliauskas