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
We're talking about class dependencies, rather than object dependencies. A linked-list in C++ (before stdlib) would have loops in the objects, but they would all be of the same class.
As I understand, OutputFormat is where the settings are, and OutputFormatter is the worker. So OutputFormatter should have a reference to OutputFormat, but there shouldn't be a need for one the other way.
We would need to change the various render methods to take an OutputFormatter argument instead of an OutputFormat. To begin with, they would need to be able to accept either, with the latter deprecated. I'm assuming there's already an easy means for users to create an OutputFormatter from an OutputFormat. If we tread this path, it means we can't mark OutputFormatter as @internal. Thoughts welcome...
Activity
JakeQZ commentedon Feb 11, 2025
We're talking about class dependencies, rather than object dependencies. A linked-list in C++ (before stdlib) would have loops in the objects, but they would all be of the same class.
As I understand,
OutputFormatis where the settings are, andOutputFormatteris the worker. SoOutputFormattershould have a reference toOutputFormat, but there shouldn't be a need for one the other way.JakeQZ commentedon Feb 11, 2025
We would need to change the various
rendermethods to take anOutputFormatterargument instead of anOutputFormat. To begin with, they would need to be able to accept either, with the latter deprecated. I'm assuming there's already an easy means for users to create anOutputFormatterfrom anOutputFormat. If we tread this path, it means we can't markOutputFormatteras@internal. Thoughts welcome...oliverklee commentedon Feb 11, 2025
I've proposed a path forward in #907.