Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123806 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id A15B61A009C for ; Tue, 25 Jun 2024 07:37:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719301129; bh=JiLBnDHSr7wXhTNp2Tq6k70l6/jtm2PY6tvVOhM2RSo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=AX6AcV4toxoXEKjxPaFc6LJD/xSClN12KjkArsFrBkJoZRcHYdUv/xLU3WwbMl9yi bSwuR6azrUBqe+o/CK+pcw+oNXUlO8ZE0fuuF/rGxTCKIMl4JYceYGqcOlfL443sfo vAE/e2jZ2qHf1eCaRQc0vqRCPdHn2UUg3r4TCcXEFwo54h6m2ndY6c3ToOnXLrKSxV o5/iwHHbbB/Bp7D+5iMPSulPZOQNw99GdVwAXtXHC7k6a36dFOXLoR3yF8tT3lKKJ4 x7kb1j4wfnehDW4NbD0V44PUrBa1v+Q3LFzPwyOQgV+BOvcDOGMcijxTGGEXZLlksh GE925XU774gug== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 49E7E180087 for ; Tue, 25 Jun 2024 07:38:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 25 Jun 2024 07:38:44 +0000 (UTC) Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-57d26a4ee65so4886668a12.2 for ; Tue, 25 Jun 2024 00:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719301047; x=1719905847; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JiLBnDHSr7wXhTNp2Tq6k70l6/jtm2PY6tvVOhM2RSo=; b=ler7Jq7H63KfixOHTv/dKiFk18jhHP3Cl7hwBC85TplH/bi3sJqsA+cpIqOoR8zjxP UvDrje6CThMkqtUuyHoIf2ZR9AjIw0VPd2+p5N2avRXI7sLd/K2cTVUOa19BUJdFh27U hD05nYkSAVijjV1gB9s1sJ6w1cAR6kcDtIMK8f9ovcgs5bECUEi7tVidHjKacEtFFwHK O0tZiQ4zLUnv02fySgFV+eCP+jh20V6sTikjz1YIwOycUu7O+M6nrbe5S+rBuLQMdn4R aM6jh64TBXpyMlSBrZv9Hl523xMg8V0KOK3c4z7KUrkd+b7auWhx9JjrzP80XwZGCrU1 pD1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719301047; x=1719905847; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JiLBnDHSr7wXhTNp2Tq6k70l6/jtm2PY6tvVOhM2RSo=; b=nvktDpUPvKD9t8y8yj8V05ujj4brrkON0xZhetkg65hXq+ZQjoLA1x28d1e860eDOq dz9rM6lIpljbo+SZz+tBdseAG1y1ms+prH9xwVl+QiFNLKfsbmv0rkZ59JImTa9agwQx 1xkphqG7ds+gqZBJAp1xzD3v/F20rEx6QZh8RTULeg08TlylYv939WXWf6/uQ/TqjzIX kl7V2BqHADh21U0i82y9IxiWH/1SE8hrFlqyqpwKu+hhJlpSBvAjATombW2rp+79CaET AdGgt7jYg3AvAQ2g65j9uH7dBf2/VDLNz4IzkoLjMqGGxrDFtAtBAorG0arKgIeoISkk mLug== X-Gm-Message-State: AOJu0Yzk/iO1ElMQwYMNAv9MP25IGmyToKa5AzLCQNYITPMEntle9i5e FxEhUlgj+93CR9TSzDzU5d7vFlmUlgfLC4j5gVO4YEb1Yplm1Ve6taY+Owkd1Z9PicZpdpxU5a6 8iPza6Pb1CPrit97z20c45GyMtZlxs7IQ X-Google-Smtp-Source: AGHT+IEFqDFcplYSe9/+b4JgxfmBJfQxeQi3NmeX6dllsB3lb8oAzNrzsQCZ921cImURpa91PHSLYMQX6wlJTYEBvvU= X-Received: by 2002:a50:950b:0:b0:57d:2659:9140 with SMTP id 4fb4d7f45d1cf-57d49dc389fmr4559764a12.25.1719301046398; Tue, 25 Jun 2024 00:37:26 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 25 Jun 2024 10:37:15 +0300 Message-ID: Subject: Re: [PHP-DEV] [RFC] [discussion] Deprecate FFI instance calls to non-static methods instead of static methods To: chopins xiao Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary="00000000000021f981061bb1f80d" From: dmitrystogov@gmail.com (Dmitry Stogov) --00000000000021f981061bb1f80d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jun 22, 2024 at 6:21=E2=80=AFAM chopins xiao 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/4acf0084dcd63ec369a610ec966= db33f322694c8 > * > deprecation of static methods is not a good solution. Now that the FFI AP= I > 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 > --00000000000021f981061bb1f80d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sat, Jun 22, 2024 at 6:21=E2=80=AF= AM chopins xiao <chopins.xiao@= gmail.com> wrote:
I've added a new RFC to deprecate FFI instance calls to non-static meth= od.

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

I think this is the right direction.
Deprecating static FFI::ne= w() is a huge BC break, performance loss and limitation to static type infe= rence.
Introducing FFI::CDef looks like a smaller BC break withou= t other degradations.

I would think about using th= e name "FFI::Scope" instead of "FFI::CDef" (term scope = already used in the API)

Thanks. Dmitry.
=C2=A0

Regards
Chopin Xiao
--00000000000021f981061bb1f80d--