Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93613 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6206 invoked from network); 27 May 2016 17:43:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 May 2016 17:43:46 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.46 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.46 mail-wm0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:36428] helo=mail-wm0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/BA-37127-15788475 for ; Fri, 27 May 2016 13:43:45 -0400 Received: by mail-wm0-f46.google.com with SMTP id n129so1864448wmn.1 for ; Fri, 27 May 2016 10:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:from:date:to:message-id; bh=14vLbt300gdMIWlqMAtD8RlJlGniqCMimT6JSsE17S4=; b=N3ymNEoQ3hzUMTeHma8u5+qw1DkCP2R4JAoqd1dMv5tCfrlY7BcoPmKLCNg2OCHsTQ aTEOcfFsXAcHcKT06TMYayO7Symew4aCCF0ECZjj2y7iqakUVaaA7DCkAex6rq8oNfIw LfsLBkZaNn6Hnd3RudocEjkFtz+M7xF2uVIiV934XTaFJmlRDebvWhZXGDjpIq4x50VQ LZGucaEkRvAecWyJHEa8ueXINNww/2mVtFMUVXZA9B6W6woxiwLxt7OqBoRZF87waNAN MW+l304SqKtU5Sp/j6B//VqihNRopV+zp3crQADxWVv5jkNiIzDoeskAfUCGrONNAuBM JUPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:from:date:to:message-id; bh=14vLbt300gdMIWlqMAtD8RlJlGniqCMimT6JSsE17S4=; b=YRrDgauYb/y4FWwMGTvam9xeVNdUOf+OVlVeEOnRePVx2xksH7KaGXk9lbvYCAvZ86 jj3NnAu+kBrtWBDjogEuBzsicvq1W+P5GITvzNmy1RrEHtqzS1u4ZCFZhS/MqocfaBW7 VeqlwyxTTw9kvhabnipRWxT8rcUoxmpxluq2rNQtMk/G+JFdrhmJcmR/s9uRkcnLrXwY J5CD6V9xBMYvr0klHFQsOrsbJKUfKQrvTAi8i4te6VHMXu6aDRJ5L4u7L7MRrVuyAKkn OYWzhsiGtC1+Ubk3wXA4zYL0LdGAlsJX4KkegVUJRg4Rw0HN9Ty627IFVZXhCxO2IF3T P68w== X-Gm-Message-State: ALyK8tKb6SzN22uwf7t0O02/elMPfOsfnjRcQPGooHmkd/rt3jGrdOFu8gkmvNRpSptlyg== X-Received: by 10.194.242.198 with SMTP id ws6mr16402766wjc.96.1464371021992; Fri, 27 May 2016 10:43:41 -0700 (PDT) Received: from [10.132.156.232] ([213.205.251.96]) by smtp.gmail.com with ESMTPSA id j6sm20399978wjb.29.2016.05.27.10.43.40 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 May 2016 10:43:41 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: <57483EC9.3000501@lsces.co.uk> References: <20160525215208.034FC1A801B3@dd1730.kasserver.com> <5fd54aa0-4fdf-c1e7-eae8-765aa89c8498@fleshgrinder.com> <08963b03-8394-6d62-4e5b-393f3fcb5647@fleshgrinder.com> <9e9db70d-d72d-d93e-0c81-18c2aa228618@gmail.com> <409002d8-b5e3-5990-7358-246adc7e3cab@fleshgrinder.com> <57474A08.80807@lsces.co.uk> <6f7403b6-bf22-a12b-dfb2-43fe82983e7d@fleshgrinder.com> <57474F9C.6080104@lsces.co.uk> <1733cfce-001b-1079-e929-88f7dde0f2dd@gmail.com> <57475F27.3090306@lsces.co.uk> <34edcbd1-2d6a-cd52-7bbb-c393ab62d32d@gmail.com> <574772BA.3030305@lsces.co.uk> <5748164C.7020803@lsces.co.uk> <5156d2d3-6c7b-b5d0-fdfd-9064d8fb1d58@fleshgrinder.com> <57483EC9.3000501@lsces.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Fri, 27 May 2016 18:43:31 +0100 To: Lester Caine ,internals@lists.php.net Message-ID: <80160E82-0C48-4A20-8594-8F12E2D7174B@gmail.com> Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: rowan.collins@gmail.com (Rowan Collins) On 27 May 2016 13:34:17 GMT+01:00, Lester Caine wrote: >Hence the 'in an ideal world'! It is perhaps worth making clear that a >'typed property' element IS simply a holder for the pointer to the real >element while the untyped properties are the element themselves? In database terms, a property - typehinted or not, scalar, whatever - is like a column. On a particular instance (= row) each property will have some particular value. Consider how "father" would be modelled as a foreign key in the DB. If you don't know the father, you would insert a null, not reference a special row representing The NullFather. And if you discovered the father was incorrect, you would update the row to point at a new record, not change the name on the old father record - it is not the name that was incorrect, only the relationship. So in OO you do the same: if you don't know the father, you store a null in that field. If you want to change the father, you point at a new object, you don't go in and edit the existing one. $this->father = $newFather; There's no "empty object" here, no need to "reset" the object which was incorrectly assigned to the father property, just a new association representing the corrected information. -- Rowan Collins [IMSoP]