Skip to main content
17 events
when toggle format what by license comment
Oct 16, 2020 at 18:31 vote accept Dathan
Oct 12, 2020 at 15:00 history tweeted twitter.com/StackSoftEng/status/1315668549583675392
Oct 8, 2020 at 8:44 answer added Sebastian Redl timeline score: 3
Oct 8, 2020 at 7:38 comment added Doc Brown @JörgWMittag: Most design patterns are much older than their name, or the time when they were written down in a book. In a system like COM, I find it highly unlikely not to find at least some design patterns (even before they got a widely accepted name).
Oct 8, 2020 at 4:40 comment added Dathan @IMSoP good point about the title - I've edited it to more narrowly refer to just the queryInterface / dynamic casting component.
Oct 8, 2020 at 4:39 comment added Dathan @JörgWMittag thanks, I've edited the title to remove the suggestion of causality -- I'm really just looking for a design pattern that describes the model -- it doesn't need to have predated or informed the design of COM itself.
Oct 8, 2020 at 4:36 history edited Dathan CC BY-SA 4.0
Further clarify the title
Oct 8, 2020 at 3:08 history edited Dathan CC BY-SA 4.0
Narrow the title to only apply to the queryInterface design pattern
Oct 7, 2020 at 16:59 comment added IMSoP Taking the question at the end of the main body, rather than the one in the title, I think this is an interesting question. I think your mention of "Adapter" is relevant, since what you get back is not an interface, but an adapter that implements that interface. But whether anyone's come up with a name and set of best practices for "objects that know about their own adapters", I'm not sure.
Oct 7, 2020 at 16:19 comment added Criticize SE actions means ban Can we say it's based on the QueryInterface design pattern? Or just the interface design pattern? It didn't have to be dynamic, it just happened to work out that way. I expect that most objects don't dynamically change their interfaces.
Oct 7, 2020 at 12:58 comment added Steve @JörgWMittag, agreed. It's also worth noting that COM was preceded by work done on OLE, and that from its inception in about 1985, Windows itself employed a somewhat object-oriented paradigm of message-passing. It's not so much based on "design patterns" as we know the term today (and in the sense it applies to programming languages), but on a system design philosophy of componentisation and composition, and COM was basically one of the things Microsoft came up with in than vein.
Oct 7, 2020 at 11:55 comment added Jörg W Mittag I find it highly unlikely that COM is based on any Design Patterns at all. In 1992, when COM was introduced, "Design Patterns" were an obscure idea by two crazy Smalltalk programmers who experimented with applying an equally obscure idea from a completely different field.
Oct 7, 2020 at 6:26 review Close votes
Oct 12, 2020 at 3:06
Oct 7, 2020 at 5:56 answer added Doc Brown timeline score: 6
Oct 7, 2020 at 0:18 comment added Erik Eidt I think casting and type conversion cover this. Most languages treat casts like an expression, in that the target of the cast is not itself converted, and, the result of the cast expression, to be useful, need to be used (e.g. assigned to another variable). Perhaps you had a more specific dynamic capability in mind (cast to type name provided as string)? This would then also go to reflection.
Oct 6, 2020 at 23:46 review First posts
Oct 20, 2020 at 23:47
Oct 6, 2020 at 23:44 history asked Dathan CC BY-SA 4.0