Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96919 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35069 invoked from network); 16 Nov 2016 13:57:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2016 13:57:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=marijic.silvio@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=marijic.silvio@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.41 as permitted sender) X-PHP-List-Original-Sender: marijic.silvio@gmail.com X-Host-Fingerprint: 209.85.214.41 mail-it0-f41.google.com Received: from [209.85.214.41] ([209.85.214.41:35277] helo=mail-it0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 46/7F-05303-3C56C285 for ; Wed, 16 Nov 2016 08:57:25 -0500 Received: by mail-it0-f41.google.com with SMTP id c20so210593586itb.0 for ; Wed, 16 Nov 2016 05:57:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=J9eu+trwp/P2K6GryFPY++l8Rfvt97l2lOq7fRMup2I=; b=sFylAzF65qssoJtMO38IQslc56fesNEzRrT3fB6L7JrRXv5jW+0wZeeFCjFcn1DFhi 3/ngKNqpMJg+2FVBl9mI4V/pro8cinkorSr1qxmOEf2xyc1fxgugxZ9bmyJvIE6U++Oc eVPnq3f2u6fzeu9MgyV+p+4vz2e8DbIz2h20aTNJWqxVTmys7axvnCW3Pucb4XC3qamj FEmid+DI81ngXew/Mlr8/zVzOEdSmcDINgSoe7Zw8TZL8Ft7JzuI9wrC5AJJSspHuwgm eaBHLDTm8B63AFJHhEBAv9/hStT7hr5yX4MnXJbfiZEPjClMYb0RRQjzXWuidRzAzfKT cT4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=J9eu+trwp/P2K6GryFPY++l8Rfvt97l2lOq7fRMup2I=; b=f0SRn4+udLJLIb7yA1KvplfomAXjUEOe0AnwDDqxg49supmsaeGax78ZtdkyDjdlBj 2JClEkiYEQ8ma+AMpsaOIlcaKiJ2s0TmG1iCq8J0yBoUpcfo67BZv9MYGboHzyPtNaC9 Unw2+0zMUyiAt8GkhS4P22Heg6D2U7cxh+C4PE5WwNOFn/F3RuFku9uKHDBVLqwr8uvr WY5/wwS5rWughtwpI7t54bNLHk2llFWIs3o3WWc/gv8Iqsp09hn8RGq0eDH6mHStxZMD gGq1XAVqlFYLWo/B7kjrpu/KJ6y5Znu11YcPt8bRm1APBSoxKLwFL1tTTEiPt8Fvtrq2 2cmg== X-Gm-Message-State: ABUngvd25jR8ezUoIAaGpDMfATQjZjLvjD6NFI4UvVz73D5pVzRMP1Ym0I6UbAS98qnIP0yZJc363xq8xYTR5w== X-Received: by 10.36.29.136 with SMTP id 130mr8215392itj.57.1479304640287; Wed, 16 Nov 2016 05:57:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.63.202 with HTTP; Wed, 16 Nov 2016 05:57:19 -0800 (PST) Date: Wed, 16 Nov 2016 14:57:19 +0100 Message-ID: To: PHP Internals List Content-Type: multipart/alternative; boundary=001a114396e4995c9205416b7395 Subject: Immutability RFC From: marijic.silvio@gmail.com (=?UTF-8?Q?Silvio_Mariji=C4=87?=) --001a114396e4995c9205416b7395 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, To anyone who is interested in this RFC. What do you think what behavour we should have when you try to compare two immutable objects by identity like this: immutable class A { public $a; public function __construct($a) { $this->a =3D $a } } $a1 =3D new A(1); $a2 =3D new A(1); $a1 =3D=3D=3D $a2 If we treat those objects as values then this should return true. But then again there might be some confusion because then two operators are doing the same thing. Maybe throw an error ? Suggestions ? Cheers. --=20 Silvio Mariji=C4=87 Software Engineer 2e Systems --001a114396e4995c9205416b7395--