history - Are design patterns really language weaknesses? -
Want today's pattern?
- SubRoutine was a design pattern for machine language in the 50's and 60's
- object-oriented class There was a design pattern for C in the 70's.
-
Visitors, Object Factories, Decorators, and Feds There are today Design Patterns for Java and C ++
What are the languages of yesterday? ? What patterns will they
something canonized Design Patterns - Adapters, Factory, Command, Visitors, etc. - Estimate of features that are baked in other languages Close to my head:
-
Event Handlers Inspector in C # If you had to roll each time to your own supervisor then think about how to wire the events in C #.
-
Visitor pattern, approximation of verbose, or actually a weak form
-
Command pattern wraps a special behavior You can pass objects between objects, which estimate at least first class function.
-
The strategy pattern allows you to dynamically insert an object in an object so that at any time you can modify the object by swaping one behavior with another. Able to In the functional programming world, we call this function structure.
-
Abstract factory pattern accepts a logic and gives a factory as a result. In general, you can think of factories such as wrap around the functions (usually wrapping around a constructor). So, you pass arguments in a function and receive a function as a result, make this pattern similar to curry.
-
Decorator Patterns at the time you run an object. In javascript, you can add or remove tasks without clearly implementing the decorator pattern for the "prototype" oo model.
The code that you need to write greater than which indicates language weakness.
Comments
Post a Comment