Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108960 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 56841 invoked from network); 10 Mar 2020 19:21:54 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Mar 2020 19:21:54 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CE80F180548 for ; Tue, 10 Mar 2020 10:42:48 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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 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-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 10 Mar 2020 10:42:48 -0700 (PDT) Received: by mail-io1-f47.google.com with SMTP id f21so9504632iol.6 for ; Tue, 10 Mar 2020 10:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Zhmc0OSovrxvLGE2ulQm+rhB6Tjb/18dnN0pF4U7LHU=; b=ecD5rnPfREs4pTuICTpzxYiZgzT9fBobQUiVaRK1luCGK1NRyIVlMTfuWPsdL9PyGq Sh+8STdmQhCKAgUNz39QToAC1w9YkYWPc7BIMjcRS4EqQjXesUXGyU7eswr55XV3z4yl 5Dxi5cPtNtEkf8Ep2P5kQKq7MJVOak4SMIJ+/NnyYBtIP3k/RTS2HbE98Hz7juE636DC 70SM4gdttDKz54nrkWyaqAh385tXkva5ZS4t84kDKQbPE07T5RzPldETiIJb7oZ1XtI6 y5Q80UxU7WG4M+KJXfdDw5MG0Doqotpr/dHNlfdKNwBQnOuWVXqB0SZ3IJUjXsxrDF+/ 6fYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Zhmc0OSovrxvLGE2ulQm+rhB6Tjb/18dnN0pF4U7LHU=; b=ZYeXu86Ceb0EOET+ehh69TncH+iQtFNgP/9Hl1DRltnpzMTPjihSkmQuvs/6CvKhft 64Dy0IPoShlIbjrH7nrFsNcQrFLdSpmMtbjYOsjs2fgb+zQDlVaWGwWrzIBkOpxOtshF IcY7LoAxKd6OucBPXLLrZHIYdhuaHoh5p4dzaAY2dE9Rpu+6ETeAac6xi0Ttl5pbV6ok pLwl3Cqt3Ej+7zCXQufFphFZpn7yDpOeZGJjb94P5X/UjufpYPIOGW+4L6WN68dmP8S/ ADMxTjV+S3oyG5GRzMsTg4jFCaYTqOz/8R57P0YHyTmOFfcE9dYEpf9WFbo9HKvUZs6z KYKA== X-Gm-Message-State: ANhLgQ3/ykD68CgXQ28uAyRgWdrn+zbHqDhlt0na+sYMrTuogULTokFI ECU1qUea1/iX7ARbrsZcIANtD4YEPrzJNamST78jdA== X-Google-Smtp-Source: ADFU+vtbv3uhVGdFawiUciiSEHYhZIzh1+hTmc+nqXxev3fzibHrcfY3l59G9mUsTGB2LTqA9wfi1xnq/qhEvY1j6RM= X-Received: by 2002:a6b:bb45:: with SMTP id l66mr19054728iof.73.1583862166056; Tue, 10 Mar 2020 10:42:46 -0700 (PDT) MIME-Version: 1.0 References: <2227A758-3035-4A43-974C-C4461A096DFB@newclarity.net> <3E1ABF22-ACB5-4952-AE11-F842D76F8B4C@newclarity.net> In-Reply-To: Date: Tue, 10 Mar 2020 17:42:34 +0000 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary="000000000000c7f95705a083a558" Subject: Re: [PHP-DEV] [RFC] Attributes v2 From: rowan.collins@gmail.com (Rowan Tommins) --000000000000c7f95705a083a558 Content-Type: text/plain; charset="UTF-8" Hi Mike, You're right that we're bikeshedding rather, but to clarify a couple of small points, and apologise on some others... On Tue, 10 Mar 2020 at 16:27, Mike Schinkel wrote: > > Saying it is a weak argument is merely opinion. > You are right, that was an unhelpful comment, and I apologise. > Pedantry notwithstanding, clearly I was speaking of "public", "private", > and "protected" (as well as "var", but I know that most PHP prefer the > visibility modifiers instead.). > My argument - or rather, my interpretation of Guido's argument in the quoted Python discussion - is that those keywords are individual species of a particular thing; they're not "empty keywords" (Guido's term) saying "here comes an access modifier", or even "here comes a property". Indeed, we might imagine a world where attributes had been added before we had those keywords, and the language ended up looking like this: << Abstract >> class Foo { << Private, Static >> int $foo = 42; << Public, Static >> getFoo(): int { return self::$foo; } } Note I've omitted the "function" keyword, because unlike "public" and "static", it doesn't modify the declaration in any way, it's just mandatory syntax which we could do without if we wanted to. > > think it makes more sense to evaluate the syntax *for this specific > case*, rather than trying to compare it to other decisions we've made in > the past. > > Sorry, but that feels really ironic. You point me to past decisions when > it support your argument, but when it does not you suggest that we evaluate > "for the specific case." > I'm sorry it came across that way. What I should probably have said is that I see the current language as inconsistent enough that it could be used to argue for either position; my examples were intended to demonstrate variety, rather than any particular pattern. That said, I didn't give enough thought to your point about declarations being different from statements; I don't find it fully convincing, but you're right that it makes a lot of my examples irrelevant. > > Before we go down the path of being the one language which does it > > differently, we should at least examine which of those is the case. > > Most likely because Java chose "@" so most everyone copied it. > Possibly; if so, that would fall into the "didn't even consider it" case. That clearly wasn't the case for Python, though, so there's at least one discussion we can learn from. > And the languages that did not use @ are generally for the more advanced developers. I'm not sure that makes sense. C# is sometimes mocked as "Microsoft Java", and very much targets the same use cases, so it's interesting that they didn't copy the syntax here. > That said, as it seems I am the only one on the list who has commented that really dislikes this syntax You could equally say I'm the only on the list who is actively defending it. If you look at discussions of the RFC off-list, "nice idea, horrible syntax" is a recurring theme, so exploring alternatives is definitely worthwhile. Regards, -- Rowan Tommins [IMSoP] --000000000000c7f95705a083a558--