Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101125 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68856 invoked from network); 12 Nov 2017 09:33:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Nov 2017 09:33:20 -0000 Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 212.232.25.162 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 212.232.25.162 mx206.easyname.com Received: from [212.232.25.162] ([212.232.25.162:47194] helo=mx206.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/D8-15386-D55180A5 for ; Sun, 12 Nov 2017 04:33:19 -0500 Received: from cable-81-173-135-113.netcologne.de ([81.173.135.113] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1eDoda-0002xh-5h; Sun, 12 Nov 2017 09:33:11 +0000 Reply-To: internals@lists.php.net To: Stanislav Malyshev , internals@lists.php.net, Niklas Keller Cc: Nikita Popov References: <93a05192-ed34-2164-50f9-2799899b32d1@fleshgrinder.com> <4ee3d414-92e1-75c7-402f-16a37ed3016b@fleshgrinder.com> <3f093ce2-e00e-f210-6e35-de31eb2f4b07@gmail.com> <0061a0c9-328c-75cb-cf6f-8e444e9ea3c0@fleshgrinder.com> <2f555141-96e0-3bab-c191-1216747644a5@fleshgrinder.com> Message-ID: <549c4634-ac38-41d3-ab43-f816a9f2b1e5@fleshgrinder.com> Date: Sun, 12 Nov 2017 10:32:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9iHinuAd7i4sObG7wQLPbI3lQrJLGbWUu" X-DNSBL-PBLSPAMHAUS: YES X-DNSBL-SPAMRATS: YES Subject: Re: [PHP-DEV] Constants and Access Modifiers From: php@fleshgrinder.com (Fleshgrinder) --9iHinuAd7i4sObG7wQLPbI3lQrJLGbWUu Content-Type: multipart/mixed; boundary="NAMsLe2H6bvNSS1g79U7Oq2V3tEne75If"; protected-headers="v1" From: Fleshgrinder Reply-To: internals@lists.php.net To: Stanislav Malyshev , internals@lists.php.net, Niklas Keller Cc: Nikita Popov Message-ID: <549c4634-ac38-41d3-ab43-f816a9f2b1e5@fleshgrinder.com> Subject: Re: [PHP-DEV] Constants and Access Modifiers References: <93a05192-ed34-2164-50f9-2799899b32d1@fleshgrinder.com> <4ee3d414-92e1-75c7-402f-16a37ed3016b@fleshgrinder.com> <3f093ce2-e00e-f210-6e35-de31eb2f4b07@gmail.com> <0061a0c9-328c-75cb-cf6f-8e444e9ea3c0@fleshgrinder.com> <2f555141-96e0-3bab-c191-1216747644a5@fleshgrinder.com> In-Reply-To: --NAMsLe2H6bvNSS1g79U7Oq2V3tEne75If Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 11/12/2017 12:44 AM, Stanislav Malyshev wrote: > Hi! >=20 >> Yes, Dart has a different understanding of const, which is exactly why= I >> posted it for you guys. In the hope that it helps to get more differen= t >> views on the topic. Currently you are too concentrated on how it is >> implemented in PHP at this time, and argue that it is impossible to >> diverge from that path. Which is simply not true, we only have to ensu= re >> backwards compatibility. >=20 > I am not arguing it's impossible, I am arguing it is not a good idea. W= e > have the concept of constants in this language, and bolting on it a > completely different concept from different language, which by > coincidence was named with the same term, would only be a source of > confusion. If we wanted immutable objects in language - which I am not > convinced at all we do, but assuming for a minute we did - there's no > reason to conflate them with constants as we have them now. These are > different things. >=20 I did not mean to say that we have to have everything exactly as Dart has it. I just wanted to show, that the meaning of const as we have is not universally the same. Abstract constants would also only be truly useful if we could define the type as well on them. Which is currently not possible. Also, I am not saying that the requested feature MUST be done with const. However, it should behave like one, which is impossible with methods. --=20 Richard "Fleshgrinder" Fussenegger --NAMsLe2H6bvNSS1g79U7Oq2V3tEne75If-- --9iHinuAd7i4sObG7wQLPbI3lQrJLGbWUu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJaCBVUAAoJEOKkKcqFPVVrn7UP/1ATWx+EgxCPqFm2eLFLnYoq c6fi/Relq1+6c9xLSvqIG4C3RRi489Z3VL6X0fqC1HHzSWwHpLzTuksj6wOmWym3 LsYDY8XDMIMV/p7feo54GMxy4sRq6wvzcHEvBZtGkSQPrk5HvRvsdteGAbXbnOOI TQPH/lNKlOOAIbEoMRY/wKWgS0NRVtV14G9K1R3TISkP0Q7BYrv+kLGSfzmekT+Z 5tgC40iqqfsTa5Z8bjB0kTv6cmJJelHqmwmfFO2PPuSTQWovIKJiP3JvE8byvVEo zP2HLBf4NZ66TFeFAVFEzQRC1GdC0hDeGIHsYNpOFwpTcBPgbapzyZMFg/aGvyTT qy7I6a8Xd7w5tbuwLRY7KYLyJ4Qw8/nZylKaPFgJbOnB0+gKynEkHi15bOmc5xtL J4bG6iZSQJt9GjuFhyTu5pIcR6v2Q+U7Qfg0elA2RHGYUsumpNWezH1ygyw64xwu J+eqcxkMKv99KjsRjE7PhlOdraugFGUu+0X2vsOvirPfugHxQylSQfstDwoKtOOi Suft4Nmy4QvuKaBNQsrg689wJHeeyX6lXKIBswSEtV8CFpWrasEdg/15nxL/wuET SIl7SDypkWVjujBtFbJHru+e5YNa1s0GKswfXL/8WsbHfJkq8w85Ri6Y71au9mjJ VXh1lIuW8s80jr8CKmOT =VsjG -----END PGP SIGNATURE----- --9iHinuAd7i4sObG7wQLPbI3lQrJLGbWUu--