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
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
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?
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.