Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93013 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88958 invoked from network); 30 Apr 2016 23:22:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Apr 2016 23:22:00 -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.50 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.50 mail-wm0-f50.google.com Received: from [74.125.82.50] ([74.125.82.50:38635] helo=mail-wm0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C6/B3-58459-71E35275 for ; Sat, 30 Apr 2016 19:22:00 -0400 Received: by mail-wm0-f50.google.com with SMTP id g17so89146362wme.1 for ; Sat, 30 Apr 2016 16:21:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=Yv8+14myTxF24hglaumT90RfVmrBQcfIOr5aXnitdD4=; b=UlMw+O8uyBIr8Icptaog2fzWgncJKr3FlPGBPyBGUFLcY48oMQOs3+QGNF0SdCQo3r 2CYOqMqupAZmEnEwTBPqXEEACLggaibrmQHELQ+O8QtFGIBMSlfKl5U9b7n9Noa79lVb KATdUYXZc7hy3OcPsZPWAaGux9IA7jWxuoYOY+OHwcfInxb0QSeSYgPBpQhW4qAhmAxI fGdzYugb3KhfE0B4OMYrNrUAuJ9YuEkWhD6PtrzWN51/UUMsi9GdcW7I5MDooGjwPbWk AwgttGls9S0lN+kPPpAnALe3l9HOfu62/Ajzsj22Bs0d36kZ1cLt0hMZPvOGf+8VgMzw s0lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Yv8+14myTxF24hglaumT90RfVmrBQcfIOr5aXnitdD4=; b=DUp7N3lnbROsJCb9t8xeRbTTbNRvPaji5DEiL3csB4bLNV9uwdpDKvXwffV45blq3c 9uzjdSxoUoTSz2NjlxwG1gXbJlLYnaDTBhJKCfBd6/utr3s9UbGyONzgKYB/DycB543I A9GZgklgjlak9d881IYhOTxmptq8bN6fBwbNsFK2GvwgszVKjf1czxspAGHir/of41dN 4lEc4yt6f5LOQLoQicqQPK5WJv3dmsrvXpArGU+CewJWl6EKC8CrLpQmwf90BPCwT7rr AwC6yJt6H/iiIHLbS2ImRWZLzdxCRn2AlElP4jCve1bH7UMx2Py5Tmw0dj5145zs4NP3 Qfqg== X-Gm-Message-State: AOPr4FUI0PtqiL1YmRcr4e/tTYBbT5fv7Nx3/MzqBPLBl8Bfsm0Wk7Pj38WOWgUcOa/9rg== X-Received: by 10.194.175.168 with SMTP id cb8mr29259210wjc.56.1462058517290; Sat, 30 Apr 2016 16:21:57 -0700 (PDT) Received: from [192.168.1.189] ([2.27.88.132]) by smtp.googlemail.com with ESMTPSA id gk4sm21989423wjd.7.2016.04.30.16.21.56 for (version=TLSv1/SSLv3 cipher=OTHER); Sat, 30 Apr 2016 16:21:56 -0700 (PDT) To: internals@lists.php.net References: <5723F2AE.2020806@garfieldtech.com> <572529F2.9070606@garfieldtech.com> <8e4ed849-f504-fe80-3c5f-e4ea114e99fa@gmail.com> <6e3f41ce-4dd5-cd29-a063-fdc9c9c920b8@gmail.com> <830b1059-9a9e-b7e1-e338-29d562588e2f@gmail.com> Message-ID: Date: Sun, 1 May 2016 00:21:48 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <830b1059-9a9e-b7e1-e338-29d562588e2f@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Attributes/Annotations Case Study: Drupal From: rowan.collins@gmail.com (Rowan Collins) On 30/04/2016 23:45, Stanislav Malyshev wrote: > Oh, of course you can have methods, but then it is strange conceptually > - you have a normal class, which some other part of the language just > uses for something else that classes are not routinely used for. I.e., > does it call a constructor? When? With which arguments? What if it > fails? What if I just create an object of this class - would it be the > same as annotation object? Hm... I was going to say "well, PDO does this if you use PDOStatement::fetchObject"; but then I remembered that the integration with the object there IS a bit weird - it injects raw properties, and *then* calls the constructor. So, I'm not sure there's a limitation in terms of the object being data-only per se, but there are certainly oddities to be dealt with in terms of construction. And as you mentioned, mutability leads to another set of oddities - are the mutations stored for next time you request that annotation, or is the object recreated on each access? Regards, -- Rowan Collins [IMSoP]