Pattern Implementation Discussion

I have not been able to find much here about the implementation of patterns in different languages. There is now a page PatternImplementations, which should have preceded PatternImplementationDiscussion. It has some discussion of RubyLanguage implementations of patterns.

On ObjectFunctionalImplementation I am attempting to report some work I have been doing using the ideas of others. There is a book (actually a Ph.D. thesis) by ThomasKuehne describing a FunctionalPatternSystemForObjectOrientedDesign.

On FunctoidsInCpp there are links to the work of Yannis Smaragdakis and Brian McNamara who have implemented FunctionalProgrammingInCpp.

On ObserverPatternInCeePlusPlus I have referred to two different authors who suggest ways to implement the ObserverPattern in C++.

Much of the work of the authors of the BoostLibraries amounts to implementing of general purpose reusable components in C++.

How much interest is there here in the implementation of reuseable components which make the patterns available in different languages?

SingletonPattern is an example which includes links to implementations in a number of different languages.

-- JohnFletcher

How much interest is there here in the implementation of reuseable components which make the patterns available in different languages?

Probably very little. A pattern is not reusable code, it's reusable knowledge. A class in any particular program will play a role in multiple design patterns at the same time. Some code that implements just one pattern is therefore not going to be very useful. And what would the classes be called? Not something that makes sense in any program's application domain that's for sure. So slapping an off-the-shelf pattern implementation into a program will make that code harder to read, reducing it's quality.

Some authors have contributed libraries which implement considerable amounts of standard structure, see for example ModernCeePlusPlusDesign.

DesignPatternsCsharp is a book giving implementations of patterns in CsharpLanguage.


See also ImplementationPatterns RosettaCode


CategoryDiscussion CategoryPattern


EditText of this page (last edited May 23, 2012) or FindPage with title or text search