Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93023 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61282 invoked from network); 1 May 2016 20:20:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 May 2016 20:20:15 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.180 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.180 mail-pf0-f180.google.com Received: from [209.85.192.180] ([209.85.192.180:34572] helo=mail-pf0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1D/35-03860-EF466275 for ; Sun, 01 May 2016 16:20:15 -0400 Received: by mail-pf0-f180.google.com with SMTP id y69so69739352pfb.1 for ; Sun, 01 May 2016 13:20:14 -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=oW45mn4K2I4iYYo8mokI8MNFxLKZetCczkwCm3N2vfI=; b=YbdA5MDlN2Av6u1zJ0c00b+K/teKCEFHHXViTE9vVq0myF4GBXq1OnjVGyYaThFRMF g2fY6Iy7s/EcaCf03DADRKUUI9i2rLB32r2x1IKS/DP7+P5TqTOgmmZDoLCnGbSV6L0a c5p76fsIgTYQJz0pNhlg/s1d9o1Re/povYTbi3eQ/k9MPMU2ZW6s2/SrUGXXb7S+88fg BLWaz+iq1lwNCIp50g9v0L6mg67ldemeQyE3U+0KcR6cV2xWnVSVTlmzDkAkGtcFjCOF Qi2JQPUxcKE63PpiECAP78E6efwupCBD/8XGkoGCd1CJHNVc2wsgSGjp+ti8seUF+Mrc oqRQ== 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=oW45mn4K2I4iYYo8mokI8MNFxLKZetCczkwCm3N2vfI=; b=LaSg1dvfOb6O+bTh3/bJFGYspInFZOYX44VgYiJDu7cGgtQLcBwc4mIP+M8QOIDtf3 AsuMBx5Tbud6zwXPqchsnycGchJ42zUGRN1UbofWXPaT/370VzpMp4lw9Z1dRtObztwu 8c0PpulwkdocNGKaWds0T9fz9Fz//Sn6edbxyeGUxTnnx77oOurR2cuV28zr4auZjKgC SB1pinedsUBearWuqQjjd6N5Q5lhGlHRQ839ctbll+Mv0K2SI6HUJxUpQNNqsnUaHRK+ SpUeJCTyk6nf1yCSZUJPmvl8l7PWVh0Z35PYaBvOKxmr+yHxz3k5PmvH2uwo7UqD41bE G2lQ== X-Gm-Message-State: AOPr4FWjW0EkhYnTjick2wdsEb4KNdbdPuK6ykBRDsoRWDs7pWpnImPSTmJHdZpM2M0pWg== X-Received: by 10.98.9.83 with SMTP id e80mr46493363pfd.34.1462134011321; Sun, 01 May 2016 13:20:11 -0700 (PDT) Received: from [192.168.2.100] (76-220-46-95.lightspeed.sntcca.sbcglobal.net. [76.220.46.95]) by smtp.gmail.com with ESMTPSA id c2sm39429322pfc.40.2016.05.01.13.20.08 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 May 2016 13:20:09 -0700 (PDT) To: Larry Garfield , 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> <57265D57.1040301@garfieldtech.com> Message-ID: <5c15ae70-f3dd-6c8a-caaf-d584b7ded8ae@gmail.com> Date: Sun, 1 May 2016 13:20:00 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <57265D57.1040301@garfieldtech.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Attributes/Annotations Case Study: Drupal From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > It would never occur to me to not have it regenerated on each access. If I want to cache it I will do so myself, thanks. Not sure why would you care. These should be value objects, so they should keep no state and as such it shouldn't matter when they are generated and how many of them. > However, that is not an issue created by using a defined structure for > the annotation result. The RFC currently says it returns an associative > array, aka anonymous struct. Those are always highly mutable. A > classed object is as mutable as its design allows it to be. To wit: As far as I can see, the RFC says it would return an array of RFC nodes. Now, it is true that array itself is mutable, we don't have immutable containers really, but that's not what I meant. The AST Node should not be really mutable. > <<__Annotation>> > class Definition { > protected $foo; > protected $bar; > public function getFoo() {} > public function getBar() {} > } Except for definitions of $foo and $bar - for which I don't see much use - this is exactly what I proposed, only as a class and not interface. I've already explained why interface is better :) > < 1, bar => 2)>> Again, here we have named arguments problem. Note that you're using diffrent syntax for named arguments than last time :) -- Stas Malyshev smalyshev@gmail.com