[Paper Review] On the Interaction of Object-Oriented Design Patterns and Programming Languages
This paper identifies gaps in mainstream object-oriented languages that complicate the implementation of common design patterns, proposing a set of orthogonal, general-purpose language constructs—such as subtyping separate from inheritance, lexically scoped closures, and multimethod dispatch—to simplify pattern implementation. The key contribution is a framework for describing design patterns in terms of these constructs, enabling clearer, more portable, and widely applicable pattern descriptions across diverse language communities.
Design patterns are distilled from many real systems to catalog common programming practice. However, some object-oriented design patterns are distorted or overly complicated because of the lack of supporting programming language constructs or mechanisms. For this paper, we have analyzed several published design patterns looking for idiomatic ways of working around constraints of the implementation language. From this analysis, we lay a groundwork of general-purpose language constructs and mechanisms that, if provided by a statically typed, object-oriented language, would better support the implementation of design patterns and, transitively, benefit the construction of many real systems. In particular, our catalog of language constructs includes subtyping separate from inheritance, lexically scoped closure objects independent of classes, and multimethod dispatch. The proposed constructs and mechanisms are not radically new, but rather are adopted from a variety of languages and programming language research and combined in a new, orthogonal manner. We argue that by describing design patterns in terms of the proposed constructs and mechanisms, pattern descriptions become simpler and, therefore, accessible to a larger number of language communities. Constructs and mechanisms lacking in a particular language can be implemented using paradigmatic idioms.
Motivation & Objective
- To identify how limitations in existing object-oriented programming languages distort or complicate the implementation of widely used design patterns.
- To analyze real-world design patterns and extract common idioms that arise due to missing language features.
- To propose a minimal, orthogonal set of language constructs and mechanisms that would better support the implementation of design patterns.
- To advocate for describing design patterns in terms of these generalized constructs to improve their accessibility and reusability across different language ecosystems.
- To guide future language design by identifying essential features—such as structural subtyping, closures, and multimethod dispatch—that are missing in most statically typed object-oriented languages.
Proposed method
- Analyzing published design patterns (e.g., Singleton, Handle-Body) to identify recurring implementation idioms driven by language limitations.
- Identifying recurring language deficiencies such as lack of garbage collection, absence of first-class closures, and weak support for subtyping and interfaces.
- Proposing a set of orthogonal language constructs: subtyping separate from inheritance, lexically scoped closure objects, and multimethod dispatch.
- Demonstrating that these constructs can express all existing design patterns more simply than current language idioms.
- Arguing that missing constructs can be emulated via paradigmatic idioms in the target language, enabling pattern portability.
- Evaluating existing languages (e.g., C++, Java, ML, Modula-3) to show their deficiencies in supporting key pattern requirements.
Experimental results
Research questions
- RQ1How do language limitations in mainstream object-oriented languages distort or complicate the implementation of common design patterns?
- RQ2Which language constructs and mechanisms are missing in current statically typed object-oriented languages that prevent clean and idiomatic implementation of design patterns?
- RQ3Can a minimal, orthogonal set of language constructs be defined that would simplify the expression of design patterns across diverse programming languages?
- RQ4To what extent can design patterns be described independently of specific language features by using a generalized set of constructs?
- RQ5How can the absence of certain language features be compensated for in practice using established programming idioms without losing clarity or correctness?
Key findings
- The lack of garbage collection in C++ forces complex idiom-based implementations of patterns like Handle-Body and Envelope-Letter, which would be simpler in a garbage-collected language.
- The Singleton pattern is largely redundant in languages that support singletons via module constructs or first-class objects, indicating that some patterns are merely workarounds for missing language features.
- Subtyping can be cleanly separated from inheritance, and doing so strengthens both mechanisms, improving type safety and code reuse.
- Lexically scoped closure objects enable functional and abstract data type programming styles, offering a more flexible alternative to class-based encapsulation.
- Multimethod dispatch extends single dispatch and enables more natural expression of polymorphic behavior across multiple arguments, improving expressiveness.
- No existing language supports the full set of proposed constructs—especially the combination of structural subtyping, closures, interfaces, and multimethods—making such a language a significant advancement in language design.
Better researchstarts right now
From paper design to paper writing, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.