Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101913 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31401 invoked from network); 23 Feb 2018 18:23:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Feb 2018 18:23:49 -0000 Authentication-Results: pb1.pair.com header.from=me@kelunik.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=me@kelunik.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain kelunik.com from 81.169.146.162 cause and error) X-PHP-List-Original-Sender: me@kelunik.com X-Host-Fingerprint: 81.169.146.162 mo4-p00-ob.smtp.rzone.de Received: from [81.169.146.162] ([81.169.146.162:17419] helo=mo4-p00-ob.smtp.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/40-28114-43C509A5 for ; Fri, 23 Feb 2018 13:23:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1519410225; s=strato-dkim-0002; d=kelunik.com; h=Content-Type:Cc:To:Subject:Message-ID:Date:From:References: In-Reply-To:X-RZG-CLASS-ID:X-RZG-AUTH; bh=sC08jIZDxb8K6y4XTb3ce15z9CFIdbA+BCvrPHGI/88=; b=n3j5kbrj0pK+GXKt6Pehzgmog8frxc8hEwxOQFTdYZTX9xjQVqncy3ji8gjMwCEFHL PyvDlZNs5XKrq1g0u9NuGI6PkV65USLwQtqoeJ+yxJfmxkaHVw9mY1tjZO5XtU+uxiBA wZVFmd2/BJ1D48K3Kxa+Aojm9BYqoS7tHRybzXr2ITTIXvV7gbxa79+bDIDCVPwwGtDK jxOnNHH+c/YWpTL1Avq+wdreroX2OTt/pTBdk0DAvZGtWtCxyx4Zhp2qCKzz0s2O+F3h j3344fC+dGojghC4b2a9JloC2mslymc0KWjBUAHZfuaoLp2fMzTnwTH1pFE2ylGHuG9L e6xA== X-RZG-AUTH: :IWkkfkWkbvHsXQGmRYmUo9mlsGbEv0XHBzMIJSS+jKTzde5mDb8Db2nURiu0cA== X-RZG-CLASS-ID: mo00 Received: by mail-yw0-f173.google.com with SMTP id x197so2837950ywg.11 for ; Fri, 23 Feb 2018 10:23:45 -0800 (PST) X-Gm-Message-State: APf1xPB9V4vNlQAUCTa7Fo0sWlbXa3YnwYP07fpebCG11OBsQ6PWXXOl sU8iceOMZ760Y0B50QrwnH6c1+Dg+oEMQrpd+9Y= X-Google-Smtp-Source: AH8x225a7wRWfJE9SPYAzBphl+j4C6+l5K3p5LWmOaGl8o5v0wOn962eQxbZbqtAUlzrZ+lerpqQKe+hwOUaBFpU/z8= X-Received: by 10.129.55.78 with SMTP id e75mr1742129ywa.161.1519410224985; Fri, 23 Feb 2018 10:23:44 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a25:a04a:0:0:0:0:0 with HTTP; Fri, 23 Feb 2018 10:23:44 -0800 (PST) In-Reply-To: References: <2B23EFFB-21C3-49E4-9000-B2E0F97E93A2@gmail.com> Date: Fri, 23 Feb 2018 19:23:44 +0100 X-Gmail-Original-Message-ID: Message-ID: To: =?UTF-8?Q?Silvio_Mariji=C4=87?= Cc: Paul Jones , PHP Internals List Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV][RFC][DISCUSSION] Immutability From: me@kelunik.com (Niklas Keller) Hey, > Problem with checking array on assignment is that it could be N dimensions > deep and one would have perform check for each item in each dimension for > mutable values which could have some performance implications. if you want to enforce that in userland now, you have even higher performance implications. I wouldn't worry about the performance of edge cases and take away a feature for everybody else because of that. If there's a better internal implementation, it can always be improved later. > Regarding constructor call, upon first initialization of object, you are > allowed to assign values to properties, after constructor is executed, > object is locked. If you try to call again constructor on the same object it > would fail as soon as execution reaches first assignment statement because > object was already marked as locked. Sounds good! So it's already implemented basically. > I agree that it would be better to pass by value but I am not sure how would > that impact the way we currently manage objects in object store. If we both agree it would be the better way, why not draft an RFC for it and find someone who knows how to implement it? Regards, Niklas