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
In C++, the IChunkWriter inherits from publicly the interface IWritable and modifies semantically the end method. Whereas for IWritable end means "all writing is finished, you can close and finalize", in the IChunkWriter it means only the current chunk is finalized, and the writer can be reused after a call to clear.
Having thus a pointer to an object of type IWritable*, one does not really know what end() means or should supposed to do. This pattern breaks polymorphism. It looks like two distinct layers are conflated through this inheritance:
layer 1: final stream / file destination.
layer 2: in-memory compression boundary.
One has to pay attention to these details if wanting to implement custom IWritables.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hi,
In C++, the IChunkWriter inherits from publicly the interface IWritable and modifies semantically the
endmethod. Whereas for IWritableendmeans "all writing is finished, you can close and finalize", in theIChunkWriterit means only the current chunk is finalized, and the writer can be reused after a call toclear.Having thus a pointer to an object of type IWritable*, one does not really know what end() means or should supposed to do. This pattern breaks polymorphism. It looks like two distinct layers are conflated through this inheritance:
One has to pay attention to these details if wanting to implement custom IWritables.
All reactions