0

Bridge pattern use case

Hi I know one use case of bridge pattern as below: This helps in separating abstraction and implementation avoiding class explosion. Is there other use case of bridge pattern? Is it used in using two different languages binding like calling one from other ? https://sololearn.com/compiler-playground/c9BiY9f22kb8/?ref=app

20th Jun 2025, 7:02 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
3 Respuestas
+ 3
One problem I have with OOP is the need to instantiate, do stuff, then destruct it in the end. Too much unnecessary activity. enums and arrays are easier to extend and faster to process. If you want simpler extensible code, maybe try a functional approach. https://sololearn.com/compiler-playground/cV6rqQW4o1KE/?ref=app
20th Jun 2025, 11:44 PM
Bob_Li
Bob_Li - avatar
0
You answered different question Bob_Li. I have not asked whether bridge pattern is good or not. People learn design pattern so that it can be used into big challenging real world problem. So, basic code shared for learning purpose will always look over engineered. Anyway, My question is still same that people heard of Bridge pattern being used in combining multiple languages (C++,Python) into a single solution or not?
22nd Jun 2025, 8:50 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
bridge pattern is about decoupling abstraction and implementation within a single language or system. interoperability between different languages is another subject entirely. what method is used depends on the task you're trying to accomplish.
22nd Jun 2025, 11:37 AM
Bob_Li
Bob_Li - avatar