Programming Languages – Why Aren’t Design Patterns Added to Language Constructs?

design-patternslanguage-designlanguage-featuresprogramming-languages

Recently I was talking with a colleague who mentioned that his company was working on adding the MVC design pattern as a PHP extension.

He explained that they wrote C code for adding Controllers, Models and Views to the language constructs to increase performance.

Now I know that MVC is an architectural design pattern that is used widely in web applications, but I still have to come across languages that have a language construct for Controllers for example.

IMHO integrating design patterns into a language can emphasize the importance of good OO design.

So, Why aren't the most used design patterns (MVC, Factory, Strategy,…etc.) added to the language constructs?

If the question sounds too broad then you may limit the question to PHP only.

Edit:

I'm not implying that one must use a design pattern when developing a project. Actually I promote the methodology of keep it simple as long as it works.

Best Answer

Design Patterns are added to language constructs all the time. Ever heard of the Subroutine Call Design Pattern? No? Me neither. That's because Subroutine Calls, which were a Design Pattern in the early 1950s got added to languages pretty much instantly. Nowadays, they are even present in the machine code instruction sets of CPUs.

What about the For Loop Design Pattern? The While Loop Design Pattern? The Switch Design Pattern? The Object Design Pattern? The Class Design Pattern? All of these have been added to some languages.