3 ms·
Could you not have the best of both worlds by writing a facade over the public-facing API? I have used this approach in the past and it works well. The facade j
by WickyNilliams 13y ago
Could you not have the best of both worlds by writing a facade over the public-facing API? I have used this approach in the past and it works well. The facade just handles grunt work of wiring the myriad of types together, as you described. It can be verified by blackbox testing or simply by eye (as it should not contain any logic beyond instantiation).
- TylerE 13y agoWhile there are valid use cases, this sort of thinking is why apps are no more responsive today than they were 20 years ago... everything is running through 20 translation layers.
- iand 13y agoI don't agree. I'm pretty sure we can make apps today equivalent to those from 20 years ago that are an order of magnitude more responsive even with all the indirection layers (640x480 resolution, 256 colours, no ui animations etc.)
- humanrebar 13y agoWhile that is a risk, it's not a necessity. Many of the classes in the C++ standard library are designed in exactly this way without runtime performance issues. All of the wrapping and indirection get inlined at compile time.
- marcosdumay 13y ago20 years ago (94!) one was always waiting for graphical applications to respond, and lots of people prefered command line applications instead, because of it. Currently, almost all interatcions with nearly all applications (Firefox and OpenOffice charged as guilty) are intantly.
- leorocky 13y agoAs long as the user facing API is simple, and the thing works well enough such the user doesn't have to know about how the underlying black box pastes its spaghetti together it doesn't matter. So I think what you are suggesting is fine.