Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93612 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4170 invoked from network); 27 May 2016 17:25:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 May 2016 17:25:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-wm0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:34879] helo=mail-wm0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FF/5A-37127-61388475 for ; Fri, 27 May 2016 13:25:43 -0400 Received: by mail-wm0-f42.google.com with SMTP id a136so1339499wme.0 for ; Fri, 27 May 2016 10:25:42 -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=Q8DvOiZENvlPguz5pCcROViopF09ZRKKHTA5fXcHY3E=; b=bdwWDKWAb7NcEgvSJ4In7WgeyqM8f/B1RYaBY5DY0dA+p6b0JW8V3RCXWgRiwWh0H4 e7IzW/X8zkEp0+PdtDJZ2/hg6VeoXDDKx4ls81cPXCndHKSuVTFs3n3qzDDX0MloDTao GZ2M+qeEhbDLs93IN7Ey1aAMcQSsiVsjG6mFfO3ShEor702vwDX5nJY/3w2ps7OEHHvO tLv3IDv/LEshF/WcSU6lsT4LXfYuH1SFHFtrI0X1pP/fIQ8SaM38ANHk/BqW2MCnbY4K XRPCsVWBR5FAXsQQ9nFgk1Ztht8j2frEMKt0PRmr7Dz0XdA7gXty2gGKblDidbzFcbpk tAXw== 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=Q8DvOiZENvlPguz5pCcROViopF09ZRKKHTA5fXcHY3E=; b=BDeL8R/EsTLCsejQSG7NgPdmFP/R1+Bn+4MSLH2oioBdvchEANYNT0LMSe9waTNtaI wrovaNIqkTIJEbqaWQfxcVa2A1ayPEFhnR+/X6XwROfvEQk2Mp6tzrHwqS9aMDYgNPry 7PlZ3dw3JBf1L4H8IBZ/CLvxlZKPjv/+fQrSIawcOrALxd5x4Ng92/qtCktU4JJkzNNt pLX7Lu8qvRdBGfRfrh8RfP7UOsfSCqNca/R2eBfhpJPPqF0zLV+cRg2BhkTF5QoLo1j8 OtZQtspU4aI0Cay3ahGWto7138SN6KdY1SBhx5tJiOOPcLh+GScrYwvsug02qOGu0gng QKOg== X-Gm-Message-State: ALyK8tJhOt9h4XHBFHih/6//0Y+IgRmj5QanifxeYJswCk5uqXAyyg539tdkDwE6t/hYMQ== X-Received: by 10.28.12.8 with SMTP id 8mr10418619wmm.6.1464369940249; Fri, 27 May 2016 10:25:40 -0700 (PDT) Received: from [10.132.156.232] ([213.205.251.96]) by smtp.gmail.com with ESMTPSA id o8sm20382228wjs.19.2016.05.27.10.25.38 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 May 2016 10:25:39 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: <57481901.1070102@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> <50f5d1c9-d24f-1afe-4c34-70aafd981524@fleshgrinder.com> <5747697A.7000906@lsces.co.uk> <37377d3b-827a-4cfd-580b-e33862084ab6@gmail.com> <5747F02A.2010808@lsces.co.uk> <426da65f-bc9a-93ed-ce16-0fefe8b9eb43@gmail.com> <57481901.1070102@lsces.co.uk> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----PC44HKHGI5ZV3AQ948PXCJTB71VV81" Content-Transfer-Encoding: 8bit Date: Fri, 27 May 2016 18:25:28 +0100 To: Lester Caine ,internals@lists.php.net Message-ID: Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: rowan.collins@gmail.com (Rowan Collins) ------PC44HKHGI5ZV3AQ948PXCJTB71VV81 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 On 27 May 2016 10:53:05 GMT+01:00, Lester Caine wrote: >On 27/05/16 10:16, Rowan Collins wrote: >> The most useful typehints are inside the SomeModel class, not the >> table-level wrapper. This is true even if they're just dumb structs, >and >> all the behaviour is at the table level, because it presumably has >> basically one field: array $data. > >Probably the only difference here is that '$row' in my result set is >not >a dumb structure. It has type information, field lengths and >potentially >even value constraints. Do you mean it "has" that type information because it's guaranteed by other logic? Or is $row already an object, in which case we're saying the same thing? > So my table level wrapper can potentially have >the same typehints that you are then adding to SomeModel. An object holding 20 people has no "date of birth" property, so how can it have a typehint for it? An object representing one row of the table can, and that's what most of the examples here are talking about. I think maybe we're just talking cross-purposes - my example was a clumsy way of saying that *somewhere* the raw data coming back from the DBMS driver gets converted to an appropriate object. The main point was that that conversion doesn't need some pool of empty objects to "fill up" with data, it just creates a new object for each row in the result set. -- Rowan Collins [IMSoP] ------PC44HKHGI5ZV3AQ948PXCJTB71VV81--