Re: [DISCUSSION] C++ Enhancements in Zend API

From: Date: Thu, 15 Aug 2024 14:50:57 +0000
Subject: Re: [DISCUSSION] C++ Enhancements in Zend API
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-124944@lists.php.net to get a copy of this message
On Aug 14 2024, at 5:27 pm, Lanre <lnearwaju@gmail.com> wrote: > > Can you point out where either of us suggested writing PHP in another language? You might be > mixing this up with the C11 thread, which has nothing to do with this. All I'm proposing is > improving the current C++ support in the engine. > https://github.com/php/php-src/blob/master/Zend/zend_portability.h > already guarantees compatibility with c++ thanks to the BEGIN_EXTERN_C() and END_EXTERN_C() macros > defined right at the top and that are used all around the engine. Notice how that macro compiles to > nothing when C++ isn't being used? I'm simply proposing more of those.. You aren't simply "proposing more of those [macros]". Per your original email: 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 common zend_api_cxx header file. - **Proposed Enhancements:** - Constructors and destructors, along with comparison operator overloads for zval. - Constructor overloads for common zval initializations. - Member methods for common zval operations. You have been asked three times now by two different people to put together an RFC of exactly what you are proposing. You have also been asked by multiple people multiple times to stop hurling insults at people you disagree with. If you can't or won't do these things, then I don't see the point in continuing this thread.

« previous php.internals (#124944) next »