If you take a look, some design patterns are solutions to problems that arise only in languages that have strong type systems.
This is not to say that strong typing is bad, but this is just something i was thinking about.
Think about the decorator pattern implemented in Java or C++. It allows you to add additional functionality or information to an object that has already been created but it is done using abstract classes, subclasses, calls to superclass methods etc.
If you take a look at a dynamic language like Javascript or ruby, this design pattern is irrelevant because you can just smack on additional functionality using object.functionality = 'xyz'
What about adapter pattern? Similar things can be said. Due to the lack of strong typing in js and ruby you often won't need to (explicitly) write classes that will convert the interface of one class so that it can be used by another. Any object with the necessary methods can be used, and the wrapping can be more easily accomplished
Same with the strategy pattern, there won't be a need to create an abstract superclass to have a common type between your strategies, you can just plug in any object that has the method you need to execute.
Of course many patterns will be present in both, like the singleton pattern, factory pattern, builder pattern, observer etc.
Dont know if any of this is making sense, I am writing it at 5 am lol
This post was edited by zeroRooter on Jan 7 2017 03:57am