Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123458 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 5AE721A009C for ; Wed, 29 May 2024 19:53:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1717012499; bh=Q4GBMnTpyEbyecSDiD92IKgkxH1118KXwICMeHVcwlk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oRPsbvFDrCIt2+clkFiPofg4FIReFqKcpYtiJOVpGcdv5wdBzGEljgS5QQU+mKzXG 7nrNtEPrBgUsShiC9cJjyQxszZCDkrhjD55Q82UUZ3uViw29c3VQKwh4Agexb7MVJI NL2N2D3QgHQme1QKNg7GCZqFF80mClOmBBFkCuF09w2DPWi3UhE039KdQ/0SbMSYCt Ssc8EJfdwikVRT2i15FdJoNO+ACrjUec2tewbNPrQV+C09u95mjSQE5K4L5jVmuAxU vIlzfl1jCog3Q/Kl1qpLKGigR5dqIiLhJr5BNcPSF2gKv7Lznk+/50SIY4Xgd947cR sg0ksoBpFJdCQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 583E71805C1 for ; Wed, 29 May 2024 19:54:57 +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,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-yw1-f178.google.com (mail-yw1-f178.google.com [209.85.128.178]) (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 ; Wed, 29 May 2024 19:54:54 +0000 (UTC) Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-62a145e0bb2so725967b3.0 for ; Wed, 29 May 2024 12:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dqxtech.net; s=google; t=1717012433; x=1717617233; 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=RAU19h7PWA88zM8Pn2befS+oZyTRzPOrbg1X9goJ1SY=; b=ailWDaEJfLvX8/FC4/ngAXqFkjmgQfRAwt0zyGk6DqanMFEHNmZNreagV4ylLmEh4y HXS/Kl1AoP48bIeTEabk9Jaalwt3XTIML7UVvbv6V56bIkMFyfWd7m3w1RuQA5Vg/AhH zGPmILtuZOMD0F8eUaPQl/e2d5d5G4DsZRIHGDdcaAHCIUjiY1yo4qGQ7XSECVkTebll 9P926ogoeDj6cAtJeefZ70tnQbir3S8jAzjz/1003wUMl6gcw3D0JMtcp70W/69SiNTp YLGghBi/RFOwqQWgBquKVgeDBzyilnEEgpXqdTLdRpVB3E3cGCCIEt5TP0Fk2W8dyDOM W2Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717012433; x=1717617233; 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=RAU19h7PWA88zM8Pn2befS+oZyTRzPOrbg1X9goJ1SY=; b=rQ5Y2tU+G4sq/ZP/R4kIfDf4ydCzyY4wXlfDQA6ENxtNxFP1eFMcc0h4Qu1wkr6wm/ XQ5sJa6RnHGiilMNXcrtNum9/t2jW0BmUFme+Bcl5HlUbWNYRGAEwfa74VduPDiV+/qS JFlufEbMiLJNJx9g12h9OVh8VM4pYZ3Djw8ZlnO5JmNMFeXgL5Va7TBv4jcmBnCPhM8i YQV/SIkaUoYvCZknJkbGyvIyb2VI2D7kqdTj0iY1Klv8228LdAMtNmcl5WC4mpeLxl2b uPkJyEhnjyy9cc1i9HVN1JPzlAuUONpF4LzGkKg5VcqWyDuI6LCG6hrTXHwHt6vBeXSE quFQ== X-Gm-Message-State: AOJu0YygE79fzV/J1cFwJoKQBCMzTgZRYQTjgOTSAEbwXIvxq///qOKL scEkAEPIXII1FKb6lfldBylYSVoKBq+DzH2Ec25ljGueC15EncREEPosCbsJSKgZq8UBjErP8uE MfQFRF+lThKTI8gcO7/XmUZeZ+VpXP6J3md6FRwQBTycsihP+KQ8= X-Google-Smtp-Source: AGHT+IFTstNKYBUx/9TOZQIN8qTyvHlpmYZUWNEu012FtWkkWtK9hYaEHQb5AdXsiJ8qksSVnUNc0uoYfWdIzBxYoDI= X-Received: by 2002:a05:690c:fd5:b0:618:8e3e:8675 with SMTP id 00721157ae682-62c6bbff969mr1911447b3.22.1717012433116; Wed, 29 May 2024 12:53:53 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <0a6a61cd-f203-4dea-a7f8-97e6b885c52d@app.fastmail.com> In-Reply-To: <0a6a61cd-f203-4dea-a7f8-97e6b885c52d@app.fastmail.com> Date: Wed, 29 May 2024 21:53:41 +0200 Message-ID: Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2 To: Larry Garfield Cc: php internals Content-Type: text/plain; charset="UTF-8" From: andreas@dqxtech.net (Andreas Hennings) Hello Larry, just a quick thought. Is there a reason why we cannot just make it "public private string $x" instead of "public private(set) string $x"? We would define that the second visibility specifier is for write. The current proposal with "public private(set)" is less ambiguous, and it is immediately obvious that this is something new, and not just somebody accidentally added two modifiers. At the same time, it feels a bit alien and cluttered. Other options could be something like "public:private" or "public-private". A consequence of such options would be that you always need to specify the read visibility along with the write visibility. But this seems ok to me. This is not a final opinion, just a thought. -- Andreas On Wed, 29 May 2024 at 21:17, Larry Garfield wrote: > > As promised, Ilija and I offer this revised version of asymmetric visibility. > > https://wiki.php.net/rfc/asymmetric-visibility-v2 > > It's still essentially the same as last year's version, but with a few adjustments and changes: > > * readonly properties are now supported in a logical fashion. > * We've brought back the abbreviated form, as public-read, something else set is the most common use case. > * The section on magic methods has been greatly simplified. The implementation itself hasn't changed, but the explanation is a lot less confusing now. > * We've explained how aviz interacts with hooks (they don't, really) and with interface properties (in the obvious way), which didn't exist at the time of the last draft. > * We've added a section with examples of how aviz is a concrete improvement, even in a world with readonly and hooks. > * We've added a section discussing why the prefix-style syntax was chosen. > > *dons flame retardant suit* > > -- > Larry Garfield > larry@garfieldtech.com