Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Often it is not obvious how to implement a given design pattern in a language. Sometimes it is difficult or cumbersome. Are there any languages built to make using design patterns easy and effective?

share|improve this question
3  
Relevant: stackoverflow.com/questions/327955/… –  Robert Harvey Sep 16 '11 at 23:16
9  
Expressive languages don't need design patterns. –  ChaosPandion Sep 16 '11 at 23:38
    
@ChaosPandion I'm not sure what you mean by that. A design pattern is a recurring solution to similar problems. Just about every language, every paradigm, and every application domain has patterns that emerge. –  Thomas Owens Sep 16 '11 at 23:44
    
@Thomas Owens - My comment was a much poorer version of Jon Purdy's answer. –  ChaosPandion Sep 16 '11 at 23:46
1  
@ChaosPandion Ah. I read your comment and left mine before I read Jon's answer, which I promptly +1'd after reading. –  Thomas Owens Sep 16 '11 at 23:49
add comment

4 Answers 4

up vote 3 down vote accepted

Consider these points:

  1. Design patterns indicate disconnect between the desired functionality and what the programming language provide
  2. This disconnect can be easily created artificially by taking some concept from one language and trying to implement it in different language
  3. Most of the existing design patterns have been found like that -- some nice smalltalk solution does not directly fit to c++, so it becomes a design pattern
  4. Nice thing about design patterns is that it allows programmers to think more about how to solve the problem, and less about how the programming language features work
  5. There really cannot be any language that helps implementing design patterns, since every language has different patterns that are common but still requires a pattern. So anything you do in language design, there is always a way to find a pattern which you didn't consider in the original design.
share|improve this answer
add comment

The important thing is that a design pattern isn’t intrinsic to a language; it’s quite literally just a code pattern at which many developers have independently arrived. The design patterns that emerge in a particular language are considered the idiomatic, preferred way of solving certain kinds of problems.

Sure, there are countless MVC “frameworks” out there, but they’re really just using MVC as a label for the underlying good practice—modularity and orthogonality between data model, presentation, and user interaction.

A language cannot be designed to make “using design patterns” easy and effective, because design patterns emerge from the design of the language. You cannot design a language around patterns that will appear as a result of its own strengths and deficiencies. All you can do is design a more expressive and powerful one. If the popular idioms and patterns for a given language are cumbersome to implement, it simply means that the language itself is cumbersome.

Tautologically: in a more expressive language, it’s easier to express yourself.

share|improve this answer
add comment

Design patterns (idioms) are usually a symptom of a programming languages short-commings. As languages improve, patterns will become intrinsic.

share|improve this answer
1  
And new patterns will emerge, for the problems we solve are endless. –  Matthieu M. Sep 17 '11 at 10:42
add comment

I don't think it's the language feature to offer design pattern, infact no language does that. Developers themselves design patterns and makes use of the language in that. MVC, MVP, MVVC are design patterns which can be applied to any language.

Also, there are some IDE, that help you leverage the design patterns. Like in case of Visual Studio 2010, you can make use MVC design pattern by selecting the ASP.NET MVC template.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.