Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not embed Record interface into baseRecord (#398)
As far as I know this is an anti-pattern, and I am not sure why it was done this way. baseRecord is just here to help reduce code duplication in dataRecord and templateRecord, which both implement the Record interface. When embedding Recod in baseRecord, we 1) obfuscate things, making it harder to detect at compile time that one of the record types is missing a method implementation, and 2) increase the size of the baseRecord struct needlessly (after this change the size is reduced from 88B down to 72B on my machine). Signed-off-by: Antonin Bas <[email protected]>
- Loading branch information