Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37316 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30017 invoked from network); 29 Apr 2008 23:48:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2008 23:48:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=robert@interjinn.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=robert@interjinn.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain interjinn.com from 66.11.173.122 cause and error) X-PHP-List-Original-Sender: robert@interjinn.com X-Host-Fingerprint: 66.11.173.122 unknown Received: from [66.11.173.122] ([66.11.173.122:54622] helo=interjinn.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CE/00-28930-5D3B7184 for ; Tue, 29 Apr 2008 19:48:39 -0400 Received: from [192.168.1.3] (blobule.suds [192.168.1.3]) by interjinn.com (Postfix) with ESMTP id 109E111FB6D; Tue, 29 Apr 2008 19:48:33 -0400 (EDT) To: "John Carter -X (johncart - PolicyApp Ltd at Cisco)" Cc: internals@lists.php.net In-Reply-To: References: <48169695.9040803@omegavortex.net> <339714303.20080429114607@marcus-boerger.de> <27A086AB-E111-49C1-ABBD-28FB6E1677BD@procata.com> <48175A65.4070301@zend.com> Content-Type: text/plain Organization: InterJinn Date: Tue, 29 Apr 2008 19:48:34 -0400 Message-ID: <1209512914.7057.296.camel@blobule> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit Subject: RE: [PHP-DEV] Class Properties in Interfaces? From: robert@interjinn.com (Robert Cummings) On Tue, 2008-04-29 at 20:04 +0200, John Carter -X (johncart - PolicyApp Ltd at Cisco) wrote: > I think there's been two responses to this query: > > 1. We can't have properties in interfaces because interfaces don't have > properties. I would say this is tautological and doesn't add anything. > > 2. Why would you need to? Getters and setters work. > > So I suppose to answer my question for myself, there's no real technical > reason for not having properties in interfaces, but getters and setters > work just fine and no-one (including me) really misses them. I have to agree. Enforcing existence of a property is just as much part of an interface as enforcing the existence of a method. Why go down the clutzy getter and setter method route when properties were meant to be accessed. Why should code be made slower? Methods are at least an order of magnitude slower than direct property access. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP