> On Aug 14, 2024, at 5:27 PM, Lanre <lnearw...@gmail.com> wrote: > >> On Wed, Aug 14, 2024 at 2:32 PM Mike Schinkel <m...@newclarity.net> wrote: >> > On Aug 14, 2024, at 3:05 PM, Arvids Godjuks <arvids.godj...@gmail.com> >> > wrote: >> > PHP has C as core and has allowed C++ for extensions. Expanding that >> > support is a no-brainer, especially since modern C++ has stepped up in >> > major ways and I don't think C sees a lot of development any more, so it >> > makes sense to move towards C++. >> >> IF there is a serious consideration given to evolving PHP to be written in >> another language — vs. just a newer version of C — I think any reasonable >> analysis would indicate that none of the languages proposed in this thread >> would be appropriate; not Rust, not C++, and not Go. Why not? > Can you point out where either of us suggested writing PHP in another > language?
Arvids wrote "I don't think C sees a lot of development any more, so it makes sense to move towards C++." That statement was why I wrote my email. > You might be mixing this up with the C11 thread, which has nothing to do with > this. No, not the case. > All I'm proposing is improving the current C++ support in the engine. I was not replying to your email(s). I was replying to Arvids' email which was worded as if moving to C++ for PHP was a foregone conclusion. > 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. I made no comment pro nor con regarding that proposal. > All of this is moot, it would be a huge investment and a whole other > discussion to port PHP to another language. That has nothing to do with my > proposal. I could be wrong as I am not an expert in either C or Zig, but from what I understand from others who have adopted Zig for C code bases it would not be a huge investment at all. Which is why I proposed it. > Again, I will reiterate that these proposed changes will not affect the > current course of PHP. Development will go on as usual and any bugs > introduced by this proposal will be contained to C++ extensions interacting > with the code. C devs can act like this doesn't even exist because as far as > the C compiler is concerned, it doesn't. On the other hand C++ devs won't > have to keep reinventing the wheel whenever they have to build an extension > with C++. What is a php extension if not a wrapper for a C/C++ lib? > > IF I wanted PHP to be implemented in C++, I would simply fork it. How many > thousand RFCs do you think it will take to get anything reasonable done? I'm > baffled that I actually have to convince y'all to IMPROVE the current support > for C++, but calm down, no one wants you to quit. Again, I did not comment on your proposal pro nor con. OTOH, as others discussed moving to Rust or C++ I wanted to ensure a more compelling alternative — Zig — was at least mentioned and considered, assuming a change is being/will be considered at all. -Mike P.S. BTW, didn't you already say this conversation was a waste of your time and imply that you were done with the thread? Then why would I be replying to you?