16 Apr 2021 16 Apr '21
24.03.21 11:54, email@example.com пише:
What about of using modern C++ in developing CPython ?
With C++ we can get the following benefits:
- Readability - less code, most code is hidden by abstraction without losing performance
- Maintainability - no code duplication in favor of using reusable classes
- RAII - Resource Acquisition Is Initialization, predictable allocation and free resources
1. You can only use C++ internally. All API should be in pure C. It reduces possible benefits. 2. If you use C++, even internally, you have to link with libstdc++ and use C++ compatible linker. 3. C++ is much much more complex than pure C. It drastically reduces the number of available contributors and maintainers.
Also note that the C code it already written. The C++ code has yet to be written, with chances to introduce new bugs during rewriting and distracting resources from other tasks.