Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119242 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 84561 invoked from network); 9 Jan 2023 16:01:16 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Jan 2023 16:01:16 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0131C180545 for ; Mon, 9 Jan 2023 08:01:16 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-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,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=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 9 Jan 2023 08:01:12 -0800 (PST) Received: by mail-wm1-f50.google.com with SMTP id k22-20020a05600c1c9600b003d1ee3a6289so7270512wms.2 for ; Mon, 09 Jan 2023 08:01:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=KO0txksYxspZZgRz7uFqB+OhldqLBT/M3s9w1WpS51g=; b=fr+QoU3Kyj3cb0eXL67VmFMJqsVZVoZBACGPrh84pMuWucAyvC007wbuJiFJTHswMC Py2hpDUuC5IflAEyU8KL5SGTRK4tLASDKUMlrQnsrtZwqD72qnFLGg+2lC5oMQX7wf0R qhKM8R1pMDSj1qjEJtyPnEo6D+DNKa7jBJrDItUlp7ncLvwY4+PNrEopfBdQKtHexZGI MhamfmDi2HKvlMXpr+LWgRptPEEkJNX0sSwCX3zJSix4PxyO8ZcFUw0DKOOLfxtHyXuR 2lTkJJXDBnQ4W7hIkz5MXOnvyf53rjG2HNAWUqwh9p1CbwOUeDE4QdO18jGE4/e4765p Uojg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=KO0txksYxspZZgRz7uFqB+OhldqLBT/M3s9w1WpS51g=; b=uVb/fJcWWCAkJgmEWW1GWZmjnwPq8QBYT8TDeBrWqLUtkIg+RUfyzGrsDm8+SqLSai yneH/TbcFeDSnVwMfGuVGnIyL7iJ5jmOT7wypI1DRLrv9/G0zclL07kAp5AWjLUvwf2u AoTDfyud2SBVoBe/25f/ywZKOv36irbOTxj7c0P+ZkxYDZdKAu/Xo0WwIWfJlfjCDugE WEmbh8vVrqT45RnIf7dVGYHEKj6cxuNZJ/yrxecvc38wr/iCMTg27QMKfE/Oe9XJLIut H1moS4r4x992vgV8HU1xo10VJYb8Sz/q381egOZB/biZEgkJbbXBr18yaUXwtyGbeXvj 8DvQ== X-Gm-Message-State: AFqh2kqCQ1iw+TA04VBF/znf9HTDNTBsDj6wA5LmS90Z5gZMl4uwi+KD mgHk2PqIhkQVA+oyx+shr+y6+Lh9hN9Ll5mv9hOElGIQYV0= X-Google-Smtp-Source: AMrXdXuNa3aadW7ytjArXthHHVFK7rpeLx1ylNL1zRlXw4pqCEAQFCODF3xGHLbvCumIitD9lON48OfIzrZbbFSJSRo= X-Received: by 2002:a05:600c:3581:b0:3d1:f8d7:1a97 with SMTP id p1-20020a05600c358100b003d1f8d71a97mr2340988wmq.140.1673280071103; Mon, 09 Jan 2023 08:01:11 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 9 Jan 2023 17:00:59 +0100 Message-ID: To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="0000000000003f792f05f1d6e0c2" Subject: Re: [PHP-DEV] [RFC][Vote] Asymmetric Visibility From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --0000000000003f792f05f1d6e0c2 Content-Type: text/plain; charset="UTF-8" > I am hereby opening the vote on the Asymmetric Visibility RFC: > > https://wiki.php.net/rfc/asymmetric-visibility > > Voting will be open for 2 weeks. > > While we would certainly prefer if everyone voted in favor, for those who > vote against the authors kindly request that you indicate why, using the > second poll question or comment section afterward. Thank you. > Hi Larry, Ilija, Thanks for opening the vote. I played a bit with the code and I didn't spot any unexpected behavior, nice work. I'm undecided for now, on two points: 1. the syntax: looking at https://wiki.php.net/rfc/property-hooks, I wonder if using public string $foo {private set;} wouldn't be more appropriate. Otherwise, it might be strange to have public private(set) string $foo {set ($value) { /* the setter */};} if hooks are the way forward. Sure we could compact that but that would introduce two very different syntax whether a setter is defined or not. WDYT? 2. the feature itself: I feel like this new syntax doesn't open new capabilities over using methods, so this might "just" add complexity in the end, adding alternative ways to do something already doable (I'm making the argument for hooks also BTW). Would you be able to clarify why we need this? (The only new capability that feels appealing to me is the "init" modifier, but this is not what this RFC is about.) About my point 2., did you consider a syntax to map a getter+setter to properties? That might fill the need for asym visibility + hooks in one go? I'm seeing quite often libraries that do this sort of mapping based on conventions. This would bake the practice into the language: public string $foo {get: getFoo, set: setFoo} or something like that, with method visibility being added on top of the property visibility. Sorry to chime in that late, I'm really undecided and discussing those topics would help. Thanks, Nicolas --0000000000003f792f05f1d6e0c2--