Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93007 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79149 invoked from network); 30 Apr 2016 22:30:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Apr 2016 22:30:33 -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.47 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.47 mail-wm0-f47.google.com Received: from [74.125.82.47] ([74.125.82.47:36903] helo=mail-wm0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/A1-58459-80235275 for ; Sat, 30 Apr 2016 18:30:33 -0400 Received: by mail-wm0-f47.google.com with SMTP id a17so88421101wme.0 for ; Sat, 30 Apr 2016 15:30:32 -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=p0dkVklcGBMgsw9Orj1AS+v7LlAtSGGTcZPMdf+Jq/w=; b=RJZ5exyRk1YWWAht1oq0vlyDTnhkaQyZ7QafdfQRZjKrIwx2INT88jLngklf+lYN5P wM/sU19cjFa8E6qPtFqEcu7U8NjpRIVN8oplfaZ4gQi3Sg/sQiD9joKdcf5TS8RL5L9W XpxoFaNGdTm4he3j/qdoYG+NUDVmrF9nrKkPq99GdgX0iKtuhQrJMacc9i0SIFwf0S/4 EKteRgg/xbJdC/wyzFDeRTXeIaW19T7fVR2rzpDGmvryNrZVBh2NlKPgnXchiYixO3iM fg5ig5FjterykU0HTawIDdIrGhn5D5J/PntYWoQd9yTV7Tbq01oTSKoGPGX7Nu+DtPgJ +FBg== 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=p0dkVklcGBMgsw9Orj1AS+v7LlAtSGGTcZPMdf+Jq/w=; b=AHOaQ3yzoi9arTpe3FlnMClI47xmz/hjWkrb7XF8br1yMqZpQx4apAEJFeS7QaymOZ KMrBCi2owsl7dn+L6E/49RWt2aZuLpdTwMQSKYGl6jHKeuEemEj1/MaJlQgJGvTjIgPU +wdITAFUkfORQLiL+N6ogT5cxD9yMLcqQf28nck9Sr3H50/0UAge69KiqRa2m25TRf1B dKY1BuQ/Rin76onUNbTWFlQDuUzgxdRQG+fj8z0Dx1SKswE7oIxfs2SAX/tI28/SHdUd Ysvj0183RqO9EfMzvB7MhkhYyPkfokmr6LjWastXDw5cJdEtQxPcgC6XtJQxyFjR7DYn I49Q== X-Gm-Message-State: AOPr4FVGSZPgxU4McE9s79pyNAfz/+Ha7y6IMxMAIZkNR1ddsr3uySH2Tn8GnaouvTQ5lQ== X-Received: by 10.194.166.3 with SMTP id zc3mr29412413wjb.104.1462055430319; Sat, 30 Apr 2016 15:30:30 -0700 (PDT) Received: from [192.168.1.189] ([2.27.88.132]) by smtp.googlemail.com with ESMTPSA id ju3sm21963052wjb.11.2016.04.30.15.30.29 for (version=TLSv1/SSLv3 cipher=OTHER); Sat, 30 Apr 2016 15:30:29 -0700 (PDT) To: internals@lists.php.net References: <5723F2AE.2020806@garfieldtech.com> <572529F2.9070606@garfieldtech.com> <8e4ed849-f504-fe80-3c5f-e4ea114e99fa@gmail.com> Message-ID: <6e3f41ce-4dd5-cd29-a063-fdc9c9c920b8@gmail.com> Date: Sat, 30 Apr 2016 23:30:20 +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: <8e4ed849-f504-fe80-3c5f-e4ea114e99fa@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:14, Stanislav Malyshev wrote: >> $def instanceof MyAnnotation; //TRUE > That looks fine, however the problem is that if MyAnnotation is a class, > then PHP does not have multiple inheritance, so it's the only class it > can be. And given that your class has no methods, $def has no methods > either and can not have any semantics besides simple data object. What would prevent the class from having methods? class MyAnnotation { public $foo; public $bar; public function doStuff() { ... } } I don't see any more need for multiple inheritance here than in any other class definition. -- Rowan Collins [IMSoP]