Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122527 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 8C5D51AD8F6 for ; Tue, 27 Feb 2024 21:22:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1709068949; bh=KPkNSD5MTkcwPkaAMrEgOFte3egiroWcLK81AhMS+v8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=gna/Fk42ei3eE37XAxZJc8Q7/rrmZ05tkj+D3Ocf/rNd9PIrw/P1WI5u/mLWjyKhi 7j3OxnK6YS4OmT+vEQ0YCQ5x+YNTipo6zDsQJt2vEQFrYy/YuCONyCFrMGHMkAsArg o/dOmQtdFRfp32G93SVBxs3OQX21abcloClhFt6sk55uh+QLCAt0RVPO+yxpzNBT8A yARf0ottdSN1yeU2sblqnlAeOzyMkJkxn1zvgtzFe9uOU90xEG5hyN7q76lnoK5Cht AKnCUX1u6SvoZvI/oNpICXXkBmUBq2D6LND8+Ak5ctE5hZmUXRXdDOM2NAxgmDefRD JLcViz/st3D4A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2857A182719 for ; Tue, 27 Feb 2024 21:22:28 +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.7 required=5.0 tests=BAYES_05,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: No X-Envelope-From: Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) (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, 27 Feb 2024 21:22:27 +0000 (UTC) Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-dcc71031680so4618950276.2 for ; Tue, 27 Feb 2024 13:22:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709068938; x=1709673738; 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=KPkNSD5MTkcwPkaAMrEgOFte3egiroWcLK81AhMS+v8=; b=jfxwoJj0VFAJPhN1yloai/Yw+guOlxWrCJlcSOGpubKnzzt/rxr1FsH+MQtoehxQJH RPuG98iB0MuHsrEwKRp/uGd+OzsftxvqJrQlsG9tKC5FOobH5yyyHKt1xHa2ZtGmM6bw 1IHK0EWDalc00hPZyKcIqESBHcnb+WaK4bz8tWb9g5/RSvKr1dWUcxslfyz/AWEjR7vF sXtH4wVyYoF7GgVZJZX4eokAVTk71QYELCJMmrv57wr9snmZjny8jG0KCvqWgXZIkVZ8 CEVOEs/0Lj70I6+C055yKcaT2IIbV2malj9OdIxD5Lda/JCeB6WwyWk+upZcpMtKFA8r crXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709068938; x=1709673738; 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=KPkNSD5MTkcwPkaAMrEgOFte3egiroWcLK81AhMS+v8=; b=TM1kPlJeeQm4fz1GIZb7lTSwNbWWrR0h1NFI2PtVCVHXoKye9HYjhL2KrnAaldyyqG T86aIwU2DNLRvurebQnLCBqPCIjatCyrmSrxrORGoVOGsr6+Ewy+R7gTWb2VQ0iCkb5+ yZDbEQHIDIuATpK2/Ae9Zd+TIr+hjY2X/nJ3EeLkdIAQN3tCH8bfV64ast+wVMlYlPfU +CRVu5XSiRoeXcR7ocJ/M8X/NA8b3umFaTSBf1++TiaArnsT3iSAh7ksOt+DXZS7H6OU +0uLGQZXlbWSOfdyW0Ni7ZDSo3X4RM2I2lBbMhoMMWsc5TOiCc3xSgOWdzN8QT5V50hR EcKA== X-Gm-Message-State: AOJu0YxMbtatrYistWeVAt3c3pvsCvoYvJNWdEKb65uuejQV4LjFYMvS 4/EtQQHuddmUZDtDRUv0HgFOp2MB5RhbqkgE6hsI+u22CeV1U0bMuao/oHMvc87Ti3DFMsNEltD YJb8V9lPclU4C9A8LokPY+8MGN4c= X-Google-Smtp-Source: AGHT+IG3GlxLqYLKXZ2V78lCQ39Xk0SfAVoW/TDfuefXf9Z+ifJvcy6+t4fczOqObRQ63uMo3MTGAi75XdsrWAbvykg= X-Received: by 2002:a25:bb51:0:b0:dc6:49d3:dd52 with SMTP id b17-20020a25bb51000000b00dc649d3dd52mr780700ybk.34.1709068938587; Tue, 27 Feb 2024 13:22:18 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 27 Feb 2024 23:22:05 +0200 Message-ID: Subject: Re: [PHP-DEV] [RFC[ Property accessor hooks, take 2 To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="000000000000fb35f80612639eca" From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --000000000000fb35f80612639eca Content-Type: text/plain; charset="UTF-8" On Wed, Feb 21, 2024, 20:58 Larry Garfield wrote: > Hello again, fine Internalians. > > After much on-again/off-again work, Ilija and I are back with a more > polished property access hooks/interface properties RFC. > I liked how the discussion and the RFC evolved so far and that we have less magic now. I didn't saw one aspect discussed, automatic detection if a property is virtual or not. Why not using explicit keyword for marking a property as virtual and not relying on the detection? Detection cannot be complete, and I can think if the property is used in another method called from the hook, we might end up with errors when extracting few lines of code as a method. Since in the reflection the "virtual" name is used, it would be natural and simple to have it explicitly as part of the property definition. Of course, a virtual property would require at least a hook type defined, otherwise there wouldn't be any point for its existence. Alex --000000000000fb35f80612639eca Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Wed, Feb 21, 2024, 20:58 Larry Garfield <larry@g= arfieldtech.com> wrote:
Hell= o again, fine Internalians.

After much on-again/off-again work, Ilija and I are back with a more polish= ed property access hooks/interface properties RFC.

I liked how the discussio= n and the RFC evolved so far and that we have less magic now.

I didn't saw one aspect discussed= , automatic detection if a property is virtual or not.
Why not using explicit keyword for marking a property as virtual and not= relying on the detection?

Detection cannot be complete, and I can think if the property is used in= another method called from the hook, we might end up with errors when extr= acting few lines of code as a method.

Since in the reflection the "virtual" name is used,= it would be natural and simple to have it explicitly as part of the proper= ty definition.

Of course= , a virtual property would require at least a hook type defined, otherwise = there wouldn't be any point for its existence.
<= br>
Alex


--000000000000fb35f80612639eca--