Design patterns are useful for object oriented languages.
But how can a non-object-oriented language such as C make of use them?
|show 2 more comments|
There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.
To reinforce the answers already given, a quote from GOF Design Patterns book itself:
While the design patterns described there are geared towards object-oriented software, and certainly object-oriented programming languages are a natural fit for it, the concepts they embody are language agnostic. What varies is the work overhead you would have to invest to implement the required OOP feature or a workaround for it.
From the wikipedia article on Software design patterns:
As you can see, there is no mention of object oriented programming here.
Design patterns apply to any computer language and sometimes are higher level (architectural patterns).
One example is for SQL - there is a even a book for SQL Design Patterns.
Design patterns are not limited to certain languages or language families. You could come up with design patterns for any language or paradigm.
If you are referring to the GOF patterns: Have a look at
BTW: Object Oriented Programming is not language dependend. Some languages make it easier, some make it harder, but you can program "object oriented" in any universal (as in 'not special purpose' like e.g. SQL) language.
|show 3 more comments|