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.

What programming language is best for implementing design patterns, (Factory , etc) especially for example if I need to develop a engineer scheduling system in less than a month.

Would Java be my only best bet or any suggestions of what would save time.

share|improve this question

closed as off-topic by MichaelT, gnat, Bart van Ingen Schenau, World Engineer Nov 4 '14 at 11:48

This question appears to be off-topic. The users who voted to close gave these specific reasons:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, World Engineer
  • "Questions about what language, technology, or project one should take up next are off topic on Programmers, as they can only attract subjective opinions for answers. There are too many individual factors behind the question to create answers that will have lasting value. You may be able to get help in The Whiteboard, our chat room." – MichaelT, Bart van Ingen Schenau
If this question can be reworded to fit the rules in the help center, please edit the question.

10  
You are going about this wrong if you are working from the "interlocking patterns" approach to designing a system. Patterns are hammers and screwdrivers for solving certain problems you encounter. They are not Lego or blueprints for building a system. –  MichaelT Nov 4 '14 at 5:36
    
software recommendations are explicitly off-topic per help center. See meta.programmers.stackexchange.com/questions/6483/… (it's the same here as at Stack Overflow) –  gnat Nov 4 '14 at 7:07
    
In order to save time. Use the tools you are most familiar with. Patterns are a communication tool amongst programmers. –  Esben Skov Pedersen Nov 4 '14 at 7:34

3 Answers 3

Many of the Gang of Four Design Patterns are really just workarounds in Object Oriented languages for mechanisms that are already available in Functional languages. Consequently, the best languages for design patterns (from a productivity standpoint) are the ones that don't require them. If you don't need the pattern, then you don't have to spend any time writing the code that implements it.

Java is not the most productive language to write programs in. It has too much ceremony. The reasons you write programs in Java (and put up with the Design Patterns) are the same reasons that make it a suitable language for large corporate systems: the ceremony makes it easier for novice programmers to follow, and it's a popular and widely-used language, which makes it easy to find programmers for and easy for managers (who don't understand the technological tradeoffs between programming languages) to make the decision to use.

Further Reading
Does Functional Programming Replace GoF Design Patterns?
Kingdom of Nouns

share|improve this answer
5  
True, the GoF design patterns are mostly tailored to the weaknesses of OO-Languages (C++ in particular, IIRC). That they don't fit functional languages stands to reason. The functional languages however, will have their own weaknesses, requiring their own design patterns. –  Thomas Stets Nov 4 '14 at 7:20
    
@ThomasStets Can you give a concrete example? The only thing I can think of that's easier in mainstream OOP languages is forming deep inheritance hierarchies. That's a rather dubious advantage. –  Doval Nov 4 '14 at 12:49
    
@Doval no, I can't do that. :-) I know too little of functional languages for that. But more than 30 years of experience as a software developer have taught me that there is no such thing as a perfect language. Functional programming may well be better than OOP (I reserve my judgement until I know more), but they will still have problems and weaknesses, and there will be best practices on how to deal with them: Design Patterns. –  Thomas Stets Nov 4 '14 at 13:21
    
@Doval For example in many scenarios C# delegates/events can simplify the observer pattern compared to the verbose form that's usually presented. Similarly using a delegate can often simplify factories. –  CodesInChaos Nov 4 '14 at 14:33
    
@CodesInChaos Sorry if my initial comment wasn't clear. I'm familiar with how functional features trivialize some OOP patterns. What I was wondering about is concrete examples of design patterns in functional languages meant to work around language shortcomings that aren't also shortcomings of mainstream OOP languages. My experience is mostly limited to ML-style languages but it seems to me that the only thing popular OOP languages make easier is inheritance. –  Doval Nov 4 '14 at 14:55

The number of patterns used in a code is not a quality metric, often quite to the contrary. Patterns are used to describe best practices to solve common problems, they are a means to reach a goal, not a goal in itself.

So what you are asking is which language has most of the common problems to be solved by design patterns.

Pick the language best suited to the problem to be solved, best fitting into the environment it has to work with, and best suited to your skills - the later point especially if you are under a time constraint as you are indicatin.

share|improve this answer

Patterns will emerge from good Design (SOLID Principles) and continuous Refactoring. If the first thing you'd like to do is implementing patterns, you will utterly fail.

Regarding your programming language question, Java would be well suited for pattern usage, with C++ and Smalltalk being equally good matches. You can also make heavy use of patterns in C#, although many of them will look significantly different when combined with C#'s inherent language features and syntatic sugar.

share|improve this answer

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