Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94929 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76217 invoked from network); 8 Aug 2016 13:51:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Aug 2016 13:51:33 -0000 Authentication-Results: pb1.pair.com header.from=michal@brzuchalski.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=michal@brzuchalski.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain brzuchalski.com designates 188.165.245.118 as permitted sender) X-PHP-List-Original-Sender: michal@brzuchalski.com X-Host-Fingerprint: 188.165.245.118 ns220893.ip-188-165-245.eu Received: from [188.165.245.118] ([188.165.245.118:45537] helo=poczta.brzuchalski.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/00-33134-26E88A75 for ; Mon, 08 Aug 2016 09:51:32 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by poczta.brzuchalski.com (Postfix) with ESMTP id AB0E9298423C for ; Mon, 8 Aug 2016 15:51:26 +0200 (CEST) Received: from poczta.brzuchalski.com ([127.0.0.1]) by localhost (poczta.brzuchalski.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MGSwWLEcT2dO for ; Mon, 8 Aug 2016 15:51:24 +0200 (CEST) Received: from mail-qt0-f176.google.com (unknown [209.85.216.176]) by poczta.brzuchalski.com (Postfix) with ESMTPSA id 9B3C4298423B for ; Mon, 8 Aug 2016 15:51:24 +0200 (CEST) Received: by mail-qt0-f176.google.com with SMTP id 52so203603693qtq.3 for ; Mon, 08 Aug 2016 06:51:24 -0700 (PDT) X-Gm-Message-State: AEkoouvNAB9azoEkBtdQj8mWBqAf7JUdAjFiu5Vp9TjeZaUTYDTSY0GcSGEr0+427M/7vOalactc3/rtAJL7tw== X-Received: by 10.237.46.6 with SMTP id j6mr28227468qtd.113.1470664283751; Mon, 08 Aug 2016 06:51:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.53.155 with HTTP; Mon, 8 Aug 2016 06:51:23 -0700 (PDT) In-Reply-To: References: Date: Mon, 8 Aug 2016 15:51:23 +0200 X-Gmail-Original-Message-ID: Message-ID: To: =?UTF-8?Q?Silvio_Mariji=C4=87?= Cc: "S.A.N" , PHP Internals List Content-Type: multipart/alternative; boundary=94eb2c12400037994d05398fb621 Subject: Re: [PHP-DEV] RFC - Immutable classes From: michal@brzuchalski.com (=?UTF-8?Q?Micha=C5=82_Brzuchalski?=) --94eb2c12400037994d05398fb621 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable It is great to hear somone is interested so why not. My lately discussion found usefull implementing 3 keywords, such as: 1. *immutable* for the functionality you are currently working on. 2. *sealed* for the above plus type not changeable. 3. *final* for the above plus not being overridable. But all of them should be implemented in different RFC's starting from Immutable because it's base point to toher two keywords. Whole idea needs refreshing discussion to clarify idea so it can success. 2016-08-08 15:23 GMT+02:00 Silvio Mariji=C4=87 : > @Michal Would you consider cooperating on implementing immutable and > sealed modifiers? > > 2016-08-08 15:20 GMT+02:00 Micha=C5=82 Brzuchalski : > >> @Silvio I've tried to implement final https://github.com/php/p >> hp-src/compare/master...brzuchal:final-properties but haven't found time >> to implement immutable and sealed, AFAIK I had problems with OPcache >> enabled, you need to remember to run every test after compile with opcac= he >> enabled in CLI. >> >> 2016-08-08 15:00 GMT+02:00 Silvio Mariji=C4=87 : >> >>> @Michal, well no I did read it. I see that there is not much going on >>> there since last year. Did you tried to implement it ? >>> >>> 2016-08-08 14:49 GMT+02:00 Micha=C5=82 Brzuchalski : >>> >>>> >>>> 2016-08-08 14:47 GMT+02:00 S.A.N : >>>> >>>>> May be better to do as immutable arrays? >>>>> >>>>> const =3D new Email; >>>>> >>>>> it will be a super global immutable instance of Email. >>>>> >>>> >>>> I think you've missunderstood concept of immutable classes. >>>> >>>> >>>> -- >>>> pozdrawiam >>>> -- >>>> Micha=C5=82 Brzuchalski >>>> >>> >>> >>> >>> -- >>> Silvio Mariji=C4=87 >>> Software Engineer >>> 2e Systems >>> >> >> >> >> -- >> pozdrawiam >> -- >> Micha=C5=82 Brzuchalski >> > > > > -- > Silvio Mariji=C4=87 > Software Engineer > 2e Systems > --=20 pozdrawiam -- Micha=C5=82 Brzuchalski --94eb2c12400037994d05398fb621--