-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Engines
-
StorEng - Refinement Pipeline
The goal of this ticket is to make WiredTiger compilable as C++.
The WT code-base would very much stay C, with C coding standards - just also compilable as C+. C+ specific features could only be used in non-mergable POCs to explore/demonstrate the potential benefits.
I understand that compiling WT as C++ has been done before at Skunkworks (AlexC, I think), but as the results were never merged, they are no longer very useful. My idea is to create a branch and get WT compiling in C++ on it with absolutely the minimal changes (mainly to CMake files, I hope) but also to make the code compatible with both languages (but still very much following the C coding style).
A simple concrete example: a void* can be implicitly cast in C to another pointer type, but in C++ it must be explicitly cast - adding that cast to the code would make the code compatible with both C and C++.
Hopefully we can then agree to a set of changes that could be merged, and keep the code compilable (and checked in Evergreen) in both languages going forward.
While C remains the ‘official’ WT language, I also hope that we can, over time, also turn on the stricter checking of C++ to help us improve our code.