Re: [RFC] [discussion] Deprecate FFI instance calls to non-static methods instead of static methods
| From: | Dmitry Stogov | Date: | Tue, 25 Jun 2024 07:37:15 +0000 |
| Subject: | Re: [RFC] [discussion] Deprecate FFI instance calls to non-static methods instead of static methods | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-123806@lists.php.net to get a copy of this message | ||
On Sat, Jun 22, 2024 at 6:21 AM chopins xiao <chopins.xiao@gmail.com> wrote:
> I've added a new RFC to deprecate FFI instance calls to non-static method..
>
> The PR
> *https://github.com/php/php-src/commit/4acf0084dcd63ec369a610ec966db33f322694c8
>
> <https://github.com/php/php-src/commit/4acf0084dcd63ec369a610ec966db33f322694c8>*
> deprecation of static methods is not a good solution. Now that the FFI API
> is a mess, this PR will make a fix impossible
>
> My RFC link
> https://wiki.php.net/rfc/ffi-non-static-deprecated
>
I think this is the right direction.
Deprecating static FFI::new() is a huge BC break, performance loss and
limitation to static type inference.
Introducing FFI::CDef looks like a smaller BC break without other
degradations.
I would think about using the name "FFI::Scope" instead of "FFI::CDef"
(term scope already used in the API)
Thanks. Dmitry.
>
>
> Regards
> Chopin Xiao
>