Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93009 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82371 invoked from network); 30 Apr 2016 22:45:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Apr 2016 22:45:37 -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.177 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.177 mail-pf0-f177.google.com Received: from [209.85.192.177] ([209.85.192.177:36769] helo=mail-pf0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/52-58459-09535275 for ; Sat, 30 Apr 2016 18:45:37 -0400 Received: by mail-pf0-f177.google.com with SMTP id c189so64497874pfb.3 for ; Sat, 30 Apr 2016 15:45:36 -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=f/Lo6ZrvmI1Q4CTj97CmzOOpygUKM8J2hneWpyB9NRw=; b=DyyKuwkuYU/vxRbDkLASKhyq99Jb/xjIV4vtU7liwkeYrgCJROivx2gqpHl+N2lt7S rniI/QBDkYtt+pgInghNc4eZ6zXT4O8FxGfcF0HxR/ErEx40xEmNDxtpCRUJEl2TrPkp 2Q1iH6PyQrabRY7eRxA7N0vWyZ/OmTVBsQ7V78hkafsJoFUVTG0RhzEXE0TQHHgICa0V lPgWJu4WZwkYvTSeg9NhDpIzSxm8rW7YvBXN+BCa25/09us/jVsQ75++uYGv40mUDkeT t8gNM0L8HIL5MIBrqU1fdlAa7+ZBH3dIRpgM+EDo0au8AtQZFkSW8UWakrw7uusl6Quo +4GQ== 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=f/Lo6ZrvmI1Q4CTj97CmzOOpygUKM8J2hneWpyB9NRw=; b=SRlMx4wXj2JabeK8cZEQvwPc+kGrzftVHUHyDSOsX8tfI2cnE3+p9cW5afrC1pioM5 4jXXakRHxSX0S9IrtxnfXXwJXo8G7/aVWLmqeT6e1mVnABDwPU7VGpq4yhUvM3RB83V2 7sNSAH38TWc9P8PsZ35028Zpw7X7+1sy7CBfHjsickNFWBaxnSnhbAveld0eSdHmUr8A SPgJw/vwlGQU6dHirxy8E8MFnGuLIBmONd6nazVzDbHUupl7lo9O1DP+4y7JHz1DnWvq z5KkzZi0ffEorm97Ugn9sC1Gwx1JpIMjAysAtDUPjhrayEdqcfj3FcwS9X52CDM5Kz5K QPQA== X-Gm-Message-State: AOPr4FWFDTu9fYfI06MfeChV1O5dSESSuXxWlGcNVFG/AUh1WiMKCtQI9XTbNVw20ZC63Q== X-Received: by 10.98.51.132 with SMTP id z126mr39413938pfz.23.1462056334136; Sat, 30 Apr 2016 15:45:34 -0700 (PDT) Received: from Stas-Air.local (76-220-46-95.lightspeed.sntcca.sbcglobal.net. [76.220.46.95]) by smtp.gmail.com with ESMTPSA id r191sm33838262pfr.36.2016.04.30.15.45.31 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 30 Apr 2016 15:45:32 -0700 (PDT) To: Rowan Collins , 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> Message-ID: <830b1059-9a9e-b7e1-e338-29d562588e2f@gmail.com> Date: Sat, 30 Apr 2016 15:45:26 -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: <6e3f41ce-4dd5-cd29-a063-fdc9c9c920b8@gmail.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! > What would prevent the class from having methods? > > class MyAnnotation > { > public $foo; > public $bar; > public function doStuff() { ... } > } 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? How the "multiple annotations" syntax in RFC would work - what <> means - one object with two parameters or two objects with one parameter? What < 0)>> actually gets? Maybe that should work but all these should be then defined. > I don't see any more need for multiple inheritance here than in any > other class definition. There kind of is if we want annotations to have additional capabilities as annotations - e.g. the AST things. -- Stas Malyshev smalyshev@gmail.com