You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every time peek into the Server innards, it makes me cringe a little. 😄 I think I've asked this before, but I don't remember what the answer was...
Why do we use pimpl pattern for the Server?
I understand when you have a library and you want to (1) hide implementation details from users, and/or (2) keep the ABI constant. That's when pimpl design comes in handy. Well, also (3) it helps reduce compilation time.
Expected behaviour
Neither (1) nor (2) applies to the Server though. Looking at the amount of headers included in the implementation files, I am not so sure (3) does very much either. Plus, there are other ways to mitigate compilation times.
Downsides of pimpl are pretty substantial:
Lots of boilerplate code.
Dynamic allocation.
Extra layer of indirection.
Massive code pessimisation (compiler can't inline or elide function calls).
I would expect the Server to use the usual OO pattern with no pimples (pun).
Steps to reproduce
Open the Server code in your favorite editor.
Observe the pimpl pattern being used everywhere.
Cringe a little 😉
Environment
Server version: v2.4.x
Operating system: N/A
The text was updated successfully, but these errors were encountered:
I don't have particularly strong feelings on this, other than I do find working with the boilerplate for methods rather tedious. And I don't feel confident enough to change what works and is already there
I do wonder how much more removing that would cause large recompiles.. It does 'leak' some implementation details to consumers of the headers, but in reality how often will they change without changes to the public methods..
I don't have particularly strong feelings on this, other than I do find working with the boilerplate for methods rather tedious. And I don't feel confident enough to change what works and is already there
I do wonder how much more removing that would cause large recompiles.. It does 'leak' some implementation details to consumers of the headers, but in reality how often will they change without changes to the public methods..
I will try to pick a small part (eg, const and mutable frame) and see what I can come up with... at some point...
Observed Behavior
Every time peek into the Server innards, it makes me cringe a little. 😄 I think I've asked this before, but I don't remember what the answer was...
Why do we use pimpl pattern for the Server?
I understand when you have a library and you want to (1) hide implementation details from users, and/or (2) keep the ABI constant. That's when pimpl design comes in handy. Well, also (3) it helps reduce compilation time.
Expected behaviour
Neither (1) nor (2) applies to the Server though. Looking at the amount of headers included in the implementation files, I am not so sure (3) does very much either. Plus, there are other ways to mitigate compilation times.
Downsides of pimpl are pretty substantial:
I would expect the Server to use the usual OO pattern with no pimples (pun).
Steps to reproduce
Environment
The text was updated successfully, but these errors were encountered: