unread
Hello,
I’m considering adding some C++ enhancements to the Zend API. These changes
would be encapsulated within #ifdef __cplusplus
guards, so they wouldn’t
interfere with the existing C implementation. The primary goal is to
provide a nicer interface for extensions while maintaining compatibility
with C.
Key points:
-
Struct-based Approach: Everything will still use structs—no classes
or non-public/non-static members. -
Isolation: Any enhancements that can be isolated from the C
implementation will be, and they will reside in a commonzend_api_cxx
header file. -
Proposed Enhancements:
- Constructors and destructors, along with comparison operator overloads
forzval
. - Constructor overloads for common
zval
initializations. - Member methods for common
zval
operations.
- Constructors and destructors, along with comparison operator overloads
I’m happy to implement and maintain these changes. Since this doesn’t
affect userland, do you think an RFC is necessary?
Also, if anyone has suggestions or ideas for this C++ API, I’d love to hear
them.
Cheers,
Lanre